感觉css开始学的目的就是要学会如何去选中你想要的特定的元素,然后对他加工给他样式让他好看。
css的语法结构是 选择符{属性:值;}而且要写 在css样式里面。
他有强大的选择付,丰富的样式属性和渲染原理。
以下是我初学css用把hi和p标签加以修改样式的事例:html:
<p>this is a stage</p> <h1>this is a jiu jiu jiu</h1> <a>this is pink</a> <span><a>this is green</a></span> <p>1111111111</p> <p class="color">22222222222222</p> <p style="background:red;">333333333</p>
css:
p,h1{ color:blue; border:1px dotted red; width:200px;} a{ background:#E61061; } span a{background:#67B374;} p:nth-child(5){background:yellow;} .color{background:#808080;}