WordPress評級評分主題如何做網站seo
一般來說,每一個項目初始化階段都需要樣式重置和樣式定制化。樣式重置最常用的就是 normalize.css 和 reset.css 這兩個文件。
他們的區(qū)別:
- Normalize.css更加注重保留有用的瀏覽器默認樣式,僅修復瀏覽器之間的不一致性,適用于需要一致性、可訪問性和可用性的項目。
- Reset CSS則取消了所有瀏覽器的默認樣式,并使用開發(fā)者自己定義的樣式來構建網頁,適用于需要更多自定義的項目。
上述來源:normalizecss_and_reset_css
所以我再項目中一般會安裝 normalize.css
npm i normalize.css
之后全局引入:
import "normalize.css";
然后手動創(chuàng)建 reset.css :
body, html, h1, h2, h3, h4, h5, h6, ul, ol, li, dl, dt, dd, header, menu, section, p, input, td, th, ins {padding: 0;margin: 0;
}a {text-decoration: none;color: #333;
}img {vertical-align: top;
}ul, li {list-style: none;
}button {outline: none;border: none;
}
還有一個文件:common.css 是配置全局通用 css 文件,比如:
body,
textarea,
select,
input,
button {font-size: 12px;color: #333;font-family: Arial, Helvetica, sans-serif;background-color: #f5f5f5;
}.wrap-v1 {width: 1100px;margin: 0 auto;
}.wrap-v2 {width: 980px;margin: 0 auto;
}.sprite_01 {background: url(../img/sprite_01.png) no-repeat 0 9999px;
}.sprite_02 {background: url(../img/sprite_02.png) no-repeat 0 9999px;
}.sprite_cover {background: url(../img/sprite_cover.png) no-repeat 0 9999px;
}.sprite_icon {background: url(../img/sprite_icon.png) no-repeat 0 9999px;
}.sprite_icon2 {background: url(../img/sprite_icon2.png) no-repeat 0 9999px;
}.sprite_icon3 {background: url(../img/sprite_icon3.png) no-repeat 0 9999px;
}.sprite_button {background: url(../img/sprite_button.png) no-repeat 0 9999px;
}.sprite_button2 {background: url(../img/sprite_button2.png) no-repeat 0 9999px;
}.sprite_table {background: url(../img/sprite_table.png) no-repeat 0 9999px;
}.sprite_playbar {background: url(../img/playbar_sprite.png) no-repeat 0 9999px;
}.sprite_playlist {background: url(../img/playlist_sprite.png) no-repeat 0 9999px;
}
.ant-message {left: 0 !important;transform: none !important;
}
.ant-message-notice-content {position: fixed !important;left: 50% !important;bottom: 60px;transform: translateX(-50%);background-color: rgba(0, 0, 0, 0.7) !important;color: #fff;
}