日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

css之去除html标签默认的外边距margin和内边距padding,通用工具类 base.css

發布時間:2023/12/19 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 css之去除html标签默认的外边距margin和内边距padding,通用工具类 base.css 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
@charset "utf-8"; /*!* @名稱:base.css* @功能:1、重設瀏覽器默認樣式* 2、設置通用原子類*/ /* 防止用戶自定義背景顏色對網頁的影響,添加讓用戶可以自定義字體 */ html {background:white;color:black; } /* 內外邊距通常讓各個瀏覽器樣式的表現位置不同 */ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {margin:0;padding:0; } /* 要注意表單元素并不繼承父級 font 的問題 */ body,button,input,select,textarea {font:12px \5b8b\4f53,arial,sans-serif; } input,select,textarea {font-size:100%; } /* 去掉 table cell 的邊距并讓其邊重合 */ table {border-collapse:collapse;border-spacing:0; } /* ie bug:th 不繼承 text-align */ th {text-align:inherit; } /* 去除默認邊框 */ fieldset,img {border:none; } /* ie6 7 8(q) bug 顯示為行內表現 */ iframe {display:block; } /* 去掉 firefox 下此元素的邊框 */ abbr,acronym {border:none;font-variant:normal; } /* 一致的 del 樣式 */ del {text-decoration:line-through; } address,caption,cite,code,dfn,em,th,var {font-style:normal;font-weight:500; } /* 去掉列表前的標識,li 會繼承 */ ol,ul {list-style:none; } /* 對齊是排版最重要的因素,別讓什么都居中 */ caption,th {text-align:left; } /* 來自yahoo,讓標題都自定義,適應多個系統應用 */ h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:500; } q:before,q:after {content:''; } /* 統一上標和下標 */ sub,sup {font-size:75%;line-height:0;position:relative;vertical-align:baseline; } sup {top:-0.5em; } sub {bottom:-0.25em; } /* 讓鏈接在 hover 狀態下顯示下劃線 */ a:hover {text-decoration:underline; } /* 默認不顯示下劃線,保持頁面簡潔 */ ins,a {text-decoration:none; } /* 去除 ie6 & ie7 焦點點狀線 */ a:focus,*:focus {outline:none; } /* 清除浮動 */ .clearfix:before,.clearfix:after {content:"";display:table; } .clearfix:after {clear:both;overflow:hidden; } .clearfix {zoom:1; /* for ie6 & ie7 */ } .clear {clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden; } /* 設置顯示和隱藏,通常用來與 js 配合 */ .hide {display:none; } .block {display:block; } /* 設置浮動,減少浮動帶來的 bug */ .fl,.fr {display:inline; } .fl {float:left; } .fr {float:right; }

?

轉載于:https://www.cnblogs.com/tiantao201101/p/5357980.html

總結

以上是生活随笔為你收集整理的css之去除html标签默认的外边距margin和内边距padding,通用工具类 base.css的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。