CSS常用样式总结
2017-07-27 17:08
330 查看
CSS书写规范:
影响布局的样式全部写在前面,可被继承的样式属性写在后面。如下:
实现效果:
代码如下:
后续慢慢补充…….
影响布局的样式全部写在前面,可被继承的样式属性写在后面。如下:
{ display: block; margin-bottom: 10px; vertical-align: top; line-height: 18px; font-size: 16px; color: red; background: #fff; }
单行文本溢出省略
{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
实现效果:
清楚浮动
ul:after{ display: block; content: "."; height: 0; line-height: 0; clear: both; visibility: hidden; }
滤镜模糊效果
效果图:代码如下:
&l 4000 t;!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> .box-wrapper{ position: relative; width: 400px; height: 300px; border: 1px solid #ccc; } .img{ margin: 75px auto; width: 200px; height: 150px; } .background{ position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -999; filter: blur(4px); // 模糊效果 background: url(gitar.jpg) no-repeat; } </style> </head> <body> <div class="box-wrapper"> <div class="img"> <img src="gitar.jpg" alt="" width="200" height="150"> </div> <div class="background"></div> </div> </body> </html>
后续慢慢补充…….
相关文章推荐
- 样式 css HTML 常用总结
- css常用样式属性总结
- 总结css常用的样式
- css - 常用样式总结
- CSS常用样式简单的总结包括定位、显示等属性
- CSS常用样式总结积累
- CSS常用样式(一)
- 【BS学习】精通CSS.DIV网页样式与布局总结
- WPF 几种常用控件样式的总结
- WPF 几种常用控件样式的总结
- 网页中应用CSS的多种样式总结
- css常用总结
- 收集的常用css页面及表单表格样式
- CSS常见样式总结
- CSS.DIV网页样式与布局学习总结
- HTML5学习_day01(7)--css常用文本样式
- css样式优先级总结
- Bootstrap的常用类(CSS和布局组件)的总结
- CSS.DIV网页样式与布局学习总结
- 常用的CSS效果总结