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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > HTML >内容正文

HTML

重置样式表--HTML

發布時間:2025/3/19 HTML 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 重置样式表--HTML 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

重置樣式表

  • 這就是一個簡單的我自己使用的重置樣式表
  • 里面的話 大多數的重置是都有啦的
  • 大家沒有的可以收藏起來 拿去用
html{/* 標準字體大小可以,在移動端使用的rem適配的話會動態改變。 */font-size:14px;/* 使用IE盒模型(個人取舍,我一般設置width是這是盒子的真實大小,包括padding和border) */box-sizing: border-box;}html,body{/* 在有些手機瀏覽器中點擊一個鏈接或著可點擊元素的時候,會出現一個半透明的灰色背景; */-webkit-tap-highlight-color: rgba(0, 0, 0, 0);/* 提升移動端滾動的體驗效果 */-webkit-overflow-scrolling: touch;overflow-scrolling: touch;/* 與瀏覽器窗口高度一致 */height: 100%;}body{/* 有些背景默認為淺灰色,所以統一設置為純白 */background: #fff;/* 照著antd上面來的,在公司就別用微軟雅黑了,不建議字體使用rem。 */font:14px,-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'/* 使字體更加順滑 */-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}/* 去除瀏覽器默認的margin和padding, 自行刪減一些不必要的標簽 */body,p,h1,h2,h3,h4,h5,h6,dl,dd,ul,ol,th,td,button,figure,input,textarea,form,pre,blockquote,figure{margin: 0;padding: 0;}a{/* 小手 */cursor: pointer;/* 取消超鏈接的默認下劃線 */text-decoration:none;/* antd里面還做了 , 看你團隊需不需要這樣的風格 */transition: color 0.3s ease;}ol,ul{/* 去除自帶的ugly樣式。 */list-style:none }/* 這些節點部分屬性沒有繼承父節點樣式,所有繼承一下,并取消outline,外輪廓的效果 */a,h1,h2,h3,h4,h5,h6,input,select,button,textarea {font-family: inherit;font-size: inherit;font-weight: inherit;font-style: inherit;line-height: inherit;color: inherit;outline: none;}button,input[type='submit'],input[type='button'] {/* 可點擊小手 */cursor: pointer;}/* 取消部分瀏覽器數字輸入控件的操作按鈕 apperance可以改變控件的外觀。 */input[type='number'] {-moz-appearance: textfield;}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button {margin: 0;-webkit-appearance: none;}/*** 刪除Firefox中的內邊框和填充。*/button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner {border-style: none;padding: 0;}/*** 讓html5中的hidden在IE10中正確顯示*/[hidden] {display: none;}template {/* 有些瀏覽器會顯示template 不過template標簽用的也少,自行取舍。 */display: none;}input,textarea,button,select{border:none;}input:focus,textarea:focus,button:focus,select:focus{outline: none;/* 木有外邊框 */}

總結

以上是生活随笔為你收集整理的重置样式表--HTML的全部內容,希望文章能夠幫你解決所遇到的問題。

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