CSS基本语法(2)——CSS语法规则
<h2 style="color: black; text-align: left; margin-bottom: 10px;">CSS<span style="color: black;">基本</span>语法(2)——CSS语法规则</h2>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">1. 样式规则</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以内嵌式为例:</p>所有css代码<span style="color: black;">必要</span>卸载<head>内部的一对<style>标签内;css在给某个标签设置样式前,<span style="color: black;">必要</span><span style="color: black;">运用</span><span style="color: black;">选取</span>器先选中标签;css样式的属性<span style="color: black;">运用</span>键值对写法,末尾加分号。<h2 style="color: black; text-align: left; margin-bottom: 10px;">2. <span style="color: black;">重视</span>事项</h2>末尾<span style="color: black;">必要</span>写分号,否则后面的代码将<span style="color: black;">没</span>效;css中,对空格换行缩进不<span style="color: black;">敏锐</span>;<h2 style="color: black; text-align: left; margin-bottom: 10px;">3. 注释</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">/*注释内容*/</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">4. 代码风格</h2>展开格式:<span style="color: black;">研发</span>过程中<span style="color: black;">运用</span>,代码可读性强<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">div</span> <span style="color: black;">{</span>
<span style="color: black;">width</span><span style="color: black;">:</span> <span style="color: black;">200</span><span style="color: black;">px</span><span style="color: black;">;</span>
<span style="color: black;">height</span><span style="color: black;">:</span> <span style="color: black;">200</span><span style="color: black;">px</span><span style="color: black;">;</span>
<span style="color: black;">}</span>
</div>紧凑格式:上传服务器时<span style="color: black;">运用</span>,减少不必要的空白字符,压缩文件<span style="color: black;">体积</span>,利于传输。(其实还应该把注释<span style="color: black;">亦</span>删掉,<span style="color: black;">能够</span>再<span style="color: black;">弥补</span>下)<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">div</span><span style="color: black;">{</span><span style="color: black;">width</span><span style="color: black;">:</span><span style="color: black;">200</span><span style="color: black;">px</span><span style="color: black;">;</span><span style="color: black;">height</span><span style="color: black;">:</span><span style="color: black;">200</span><span style="color: black;">px</span><span style="color: black;">;}</span></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">英文<span style="color: black;">体积</span>写</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span>用大写书写CSS,<span style="color: black;">然则</span>更<span style="color: black;">举荐</span>用小写空格规范</p><span style="color: black;">选取</span>器之后添加一个空格,属性名:之后加一个空格<div style="color: black; text-align: left; margin-bottom: 10px;"><a style="color: black;"><span style="color: black;"><span style="color: black;">Links:目录——走扎实的前端路</span><span style="color: black;">5 赞同 · 0 评论<span style="color: black;"><span style="color: black;">文案</span></span></span></span></a></div>
谷歌外贸网站优化技术。 外贸B2B平台有哪些? 说得好啊!我在外链论坛打滚这么多年,所谓阅人无数,就算没有见过猪走路,也总明白猪肉是啥味道的。 论坛外链网http://www.fok120.com/
页:
[1]