CSS Reset(css的初始化)
生活随笔
收集整理的這篇文章主要介紹了
CSS Reset(css的初始化)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?不同的瀏覽器對每種的標簽都有默認的樣式。大部分瀏覽器的樣式還有點區別。為了保證讓所有的標簽的樣式清零,也就是重置,以便于我們后續的開發和管
理,一般都會在網站一開始對所有的標簽做一下樣式的重置操作,為此我們新建一個css文件,css代碼如下:
1 @charset "utf-8"; 2 3 html{ 4 color:#000; 5 background:#FFF; 6 } 7 body, 8 div, 9 dl, 10 dt, 11 dd, 12 ul, 13 ol, 14 li, 15 h1, 16 h2, 17 h3, 18 form, 19 fieldset, 20 input, 21 textarea, 22 p, 23 blockquote, 24 th, 25 td { 26 margin:0; 27 padding:0; 28 } 29 table { 30 border-collapse:collapse; 31 border-spacing:0; 32 } 33 a { 34 text-decoration: none; 35 } 36 em, 37 strong, 38 b, 39 u, 40 i{ 41 font-style:normal; 42 font-weight:normal; 43 } 44 ol, 45 ul { 46 list-style:none; 47 } 48 h1, 49 h2, 50 h3{ 51 font-size:100%; 52 font-weight:normal; 53 } 54 input, 55 textarea, 56 select { 57 font-family:inherit; 58 font-size:inherit; 59 font-weight:inherit; 60 *font-size:100%; /*to enable resizing for IE*/ 61 } 62 img { 63 border: 0 none; 64 } 65 input { 66 border: none; 67 }詳情參照雅虎css樣式重置:https://github.com/yui/yui3/blob/master/src/cssreset/css/cssreset.css
轉載于:https://www.cnblogs.com/cuibin/p/6708208.html
總結
以上是生活随笔為你收集整理的CSS Reset(css的初始化)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 搭建ceph单节点对象存储服务器
- 下一篇: 简单粗暴的移动端页面开发技能