css initialization

PHP中文网
Release: 2017-07-03 17:31:32
Original
1543 people have browsed it
<span style="color: #008080"> 1</span> <span style="color: #008000">/*</span><span style="color: #008000">css 初始化 </span><span style="color: #008000">*/</span>
<span style="color: #008080"> 2</span> <span style="color: #800000">html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img </span>{<span style="color: #ff0000"> margin</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000"> padding</span>:<span style="color: #0000ff">0</span>; } 
<span style="color: #008080"> 3</span> <span style="color: #800000">fieldset, img,input,button </span>{<span style="color: #ff0000"> border</span>:<span style="color: #0000ff">none</span>;<span style="color: #ff0000"> padding</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000">margin</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000">outline-style</span>:<span style="color: #0000ff">none</span>; }
<span style="color: #008080"> 4</span> <span style="color: #800000">ul, ol </span>{<span style="color: #ff0000"> list-style</span>:<span style="color: #0000ff">none</span>; }
<span style="color: #008080"> 5</span> <span style="color: #800000">input </span>{<span style="color: #ff0000"> padding-top</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000"> padding-bottom</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000"> font-family</span>:<span style="color: #0000ff"> "SimSun","宋体"</span>;}
<span style="color: #008080"> 6</span> <span style="color: #800000">select, input </span>{<span style="color: #ff0000"> vertical-align</span>:<span style="color: #0000ff">middle</span>; }
<span style="color: #008080"> 7</span> <span style="color: #800000">select, input, textarea </span>{<span style="color: #ff0000"> font-size</span>:<span style="color: #0000ff">12px</span>;<span style="color: #ff0000"> margin</span>:<span style="color: #0000ff">0</span>; }
<span style="color: #008080"> 8</span> <span style="color: #800000">textarea </span>{<span style="color: #ff0000"> resize</span>:<span style="color: #0000ff">none</span>; }
<span style="color: #008080"> 9</span> <span style="color: #800000">img </span>{<span style="color: #ff0000">border</span>:<span style="color: #0000ff">0</span>;<span style="color: #ff0000">    vertical-align</span>:<span style="color: #0000ff">middle</span>;}
<span style="color: #008080">10</span> <span style="color: #800000">table </span>{<span style="color: #ff0000"> border-collapse</span>:<span style="color: #0000ff">collapse</span>; }
<span style="color: #008080">11</span> <span style="color: #800000">body </span>{
<span style="color: #008080">12</span> <span style="color: #ff0000">    font</span>:<span style="color: #0000ff">12px/150% Arial,Verdana,"\5b8b\4f53"</span>;
<span style="color: #008080">13</span> <span style="color: #ff0000">    color</span>:<span style="color: #0000ff">#666</span>;
<span style="color: #008080">14</span> <span style="color: #ff0000">    background</span>:<span style="color: #0000ff">#fff
</span><span style="color: #008080">15</span> }
<span style="color: #008080">16</span> <span style="color: #800000">.clearfix:before,.clearfix:after</span>{ 
<span style="color: #008080">17</span> <span style="color: #ff0000">    content</span>:<span style="color: #0000ff">""</span>; 
<span style="color: #008080">18</span> <span style="color: #ff0000">    display</span>:<span style="color: #0000ff">table</span>; 
<span style="color: #008080">19</span> } 
<span style="color: #008080">20</span> <span style="color: #800000">.clearfix:after</span>{<span style="color: #ff0000">clear</span>:<span style="color: #0000ff">both</span>;} 
<span style="color: #008080">21</span> <span style="color: #800000">.clearfix</span>{ 
<span style="color: #008080">22</span> <span style="color: #ff0000">    *zoom</span>:<span style="color: #0000ff">1</span>;<span style="color: #008000">/*</span><span style="color: #008000">IE/7/6</span><span style="color: #008000">*/</span> 
<span style="color: #008080">23</span> } 
<span style="color: #008080">24</span> <span style="color: #800000">a</span>{<span style="color: #ff0000">color</span>:<span style="color: #0000ff">#666</span>;<span style="color: #ff0000"> text-decoration</span>:<span style="color: #0000ff">none</span>; }
<span style="color: #008080">25</span> <span style="color: #800000">a:hover</span>{<span style="color: #ff0000">color</span>:<span style="color: #0000ff">#C81623</span>;}
<span style="color: #008080">26</span> <span style="color: #800000">h1,h2,h3,h4,h5,h6</span>{<span style="color: #ff0000">text-decoration</span>:<span style="color: #0000ff">none</span>;<span style="color: #ff0000">font-weight</span>:<span style="color: #0000ff">normal</span>;}
<span style="color: #008080">27</span> <span style="color: #800000">s,i,em</span>{<span style="color: #ff0000">font-style</span>:<span style="color: #0000ff">normal</span>;<span style="color: #ff0000">text-decoration</span>:<span style="color: #0000ff">none</span>;}
<span style="color: #008080">28</span> <span style="color: #800000">.col-red</span>{<span style="color: #ff0000">color</span>:<span style="color: #0000ff"> #C81623!important</span>;}
<span style="color: #008080">29</span> 
<span style="color: #008080">30</span> <span style="color: #008000">/*</span><span style="color: #008000">公共类</span><span style="color: #008000">*/</span>
<span style="color: #008080">31</span> <span style="color: #800000">.w</span>{
<span style="color: #008080">32</span> <span style="color: #ff0000">    width</span>:<span style="color: #0000ff"> 1210px</span>;<span style="color: #ff0000">margin</span>:<span style="color: #0000ff">0 auto</span>;
<span style="color: #008080">33</span> }
<span style="color: #008080">34</span> <span style="color: #800000">.fl </span>{
<span style="color: #008080">35</span> <span style="color: #ff0000">    float</span>:<span style="color: #0000ff">left
</span><span style="color: #008080">36</span> }
<span style="color: #008080">37</span> <span style="color: #800000">.fr </span>{
<span style="color: #008080">38</span> <span style="color: #ff0000">    float</span>:<span style="color: #0000ff">right
</span><span style="color: #008080">39</span> }
<span style="color: #008080">40</span> <span style="color: #800000">.al </span>{
<span style="color: #008080">41</span> <span style="color: #ff0000">    text-align</span>:<span style="color: #0000ff">left
</span><span style="color: #008080">42</span> }
<span style="color: #008080">43</span> <span style="color: #800000">.ac </span>{
<span style="color: #008080">44</span> <span style="color: #ff0000">    text-align</span>:<span style="color: #0000ff">center
</span><span style="color: #008080">45</span> }
<span style="color: #008080">46</span> <span style="color: #800000">.ar </span>{
<span style="color: #008080">47</span> <span style="color: #ff0000">    text-align</span>:<span style="color: #0000ff">right
</span><span style="color: #008080">48</span> }
<span style="color: #008080">49</span> <span style="color: #800000">.hide </span>{
<span style="color: #008080">50</span> <span style="color: #ff0000">    display</span>:<span style="color: #0000ff">none
</span><span style="color: #008080">51</span> }
Copy after login

 

The above is the detailed content of css initialization. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!