【1】禁止换行
.class {word-break:keep-all;white-space:nowrap;}
【2】强制换行
.class{word-break:break-all;}
普通容器中(Div)的用法建议
word-wrap:break-word;
容器中(Div)中的表格的用法建议
table-layout:fixed;word-wrap:break-word;
【3】hank手法
.class {
background:#000;
background:#06f\9;
background:#090\0;
background:#090\0/;
*background:#f60;
_background:#f00;
}

【4】透明图层
.class {
background: rgba(255, 132, 0, 0.8) !important;
background: #ff8400; filter: alpha(opacity=80);
}

【5】渐变色兼容
1 第一种渐变
.class {
background:#7d7d7d;
background:linear-gradient(to bottom, #7d7d7d, #191919);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7d7d7d,endColorstr=#191919,grandientType=1);
background: -ms-linear-gradient(top, #7d7d7d, #191919);
background:-moz-linear-gradient(top,#7d7d7d,#191919);

background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#7d7d7d), to(#191919));
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#7d7d7d), to(#191919));
background: -webkit-linear-gradient(top, #7d7d7d, #191919);
background: -o-linear-gradient(top, #7d7d7d, #191919);
}

第二种渐变
.class {
background: #d53727;
background: -moz-linear-gradient(top, #d53727 0%, #d53727 50%, #c51f14 51%, #c51f14 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d53727), color-stop(50%,#d53727), color-stop(51%,#c51f14), color-stop(100%,#c51f14));
background: -webkit-linear-gradient(top, #d53727 0%,#d53727 50%,#c51f14 51%,#c51f14 100%);

background: -o-linear-gradient(top, #d53727 0%,#d53727 50%,#c51f14 51%,#c51f14 100%);
background: -ms-linear-gradient(top, #d53727 0%,#d53727 50%,#c51f14 51%,#c51f14 100%);
background: linear-gradient(to bottom, #d53727 0%,#d53727 50%,#c51f14 51%,#c51f14 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d53727', endColorstr='#c51f14',GradientType=0 );
}
【6】如何让谷歌浏览

p{font-size:10px;-webkit-transform:scale(0.8);}

【7】苹果iPhone safari浏览器样式重置修复submit按钮圆角bug

input[type="text"],input[type="password"]{-webkit-appearance: none;border-radius: 0;}
input[type="submit"],input[type="reset"],input[type="button"],button{ -webkit-appearance: none;}

【8】dreamweaver 删除多余空白(√使用正则表达式)
((\r\n)\s*\r\n){1,}
$2

【9】CSS3的calc()使用 calc不明白的打开:http://www.w3cplus.com/css3/how-to-use-css3-calc-function.html
calc()的运算规则
使用“+”、“-”、“*” 和 “/”四则运算;
可以使用百分比、px、em、rem等单位;
可以混合使用各种单位进行计算;
表达式中有“+”和“-”时,其前后必须要有空格,如"widht: calc(12%+5em)"这种没有空格的写法是错误的;
表达式中有“*”和“/”时,其前后可以没有空格,但建议留有空格。

浏览器的兼容性

浏览器对calc()的兼容性还算不错,在IE9+、FF4.0+、Chrome19+、Safari6+都得到较好支持,同样需要在其前面加上各浏览器厂商的识别符,不过可惜的是,移动端的浏览器还没仅有“firefox for android 14.0”支持,其他的全军覆没
.elm {

-moz-calc(expression);

-webkit-calc(expression);

calc();
}
【10】 transition 与 transform

transform 属性向元素应用 2D 或 3D 转换。该属性允许我们对元素进行旋转、缩放、移动或倾斜。
transform:rotate(0deg) scale(1.1); 意思:以自己为中心放大1.1倍
transition参考文章http://www.w3cplus.com/content/css3-transition
transition:all 0.3s ease 0s;
【11】a 链接到同一个页面的不同位置
<a href="#C4">查看 Chapter 4。</a>
<h2><a name="C4">Chapter 4</a></h2>

最新文章

  1. WPF绑定到集合
  2. iOS 浅复制和深复制的深层理解,含示例
  3. imagepool前端图片加载管理器(JavaScript图片连接池)
  4. Apache使用简介
  5. POJ C程序设计进阶 编程题#3 : 排队游戏
  6. c语言入门教程 / c语言入门经典书籍
  7. scala学习笔记:控制抽象
  8. [Linked List]Copy List with Random Pointer
  9. IE8 多进程问题
  10. [android更新类的内容开发APP]四、项目布局的基本功能(继续)
  11. IOC模式理解
  12. 谈谈Ext JS组件之引子
  13. [Android] TabLayout设置下划线(Indicator)宽度
  14. 洛谷P1039 侦探推理(模拟)
  15. Excel技巧--做一去重复的数据下拉列表
  16. 监控(1)-企业常用服务监控shell
  17. js -【 数组】判断一个变量是数组类型的几种方法
  18. java开发简易计算器
  19. Json数据处理协议与办法
  20. Leetcode--572. Subtree of Another Tree(easy)

热门文章

  1. 尚硅谷springboot学习4-helloworld探究
  2. 尚硅谷redis学习10-复制
  3. XML报错:The reference to entity &quot;characterEncoding&quot; must end with the &#39;;&#39; delimite
  4. windows下配置mysql环境变量 - 使用cmd访问mysql(图)
  5. mysql执行流程
  6. intelliJ IDEA 破解,亲测有效
  7. php图片转base64
  8. Mat取行或列
  9. versionCode &amp; versionName
  10. SO\PR\MO\排产回写的数据如下