为什么80%的码农都做不了架构师?>>>
3.css选择器:
<html><head><title>外部链接CSS文件</title><style type="text/css">/*标签选择器,页面中所有的p标签都会使用该样式*/p{color:#f00;}/* ID选择器,此时会对所有的id为p2的标签进行样式设置,ID不能重复 */p.#p2{font-weight:bold;text-decoration:underline;}/* p.p1表示class为p1的p标签,类选择器,类ID可以重复 */p.p1{color:#54a;font-size:16px;}p.p2{color:998733;}/*包含选择符,指的是p标签中的所有span标签都来设置这个样式 */p span{background:#ff0;}/* 包含选择符会包含div标签中的所有span,包括子标签中的span */div span{background:#0ff;}/* 子对象选择符 */div > h2{color:#000;font-weight:bold;}/* 子对象选择符仅仅只针对div标签的第一级子对象 */div > span{color:red;}/*分组选择符,以下表示所有的id为d1或者p2的标签都使用该样式 ,逗号分隔 */#d1,#p2{font-size:19px;background:#999;}</style></head><body><div id="d1">Limitation of Liability. In no event and<h5>under no legal theory,<span>whether in tort (including negligence), contract, or </span>otherwise,unless required</h5> by applicable law (such as deliberate and grossly<h2>negligent acts) or agreed to in writing, shall any </h2>Contributor beliable <span>to You for damages, including any direct, </span>indirect, special,incidental, or consequential damages of any character arising as aresult of this License or out of the use or inability to use theWork (including but not limited to damages for loss of goodwill,work stoppage,</div><p class="p1">Subclipse 是一个为 Eclipse IDE 添加 Subversion 支持的项目。支持几乎所有版本的Eclipse。<span>Eclipse的更新地址是:</span>http://subclipse.tigris.org/update_1.6.x<span>http://subclipse.tigris.org/update_1.8.x (支持Subversion 1.7.x)</span></p><p id="p2">Spring Framework version 3.2.9.RELEASE<span>There you will find links to the forum, issue tracker, and other resources.See https://github.com/SpringSource/spring-framework#readme for additional</span>information including instructions on building from source.</p><p class="p2">granted to You under this License for that Work shall terminate(c) You must retain, in the Source form of any Derivative Worksthat You distribute, all copyright, patent, trademark, andattribution notices from the Source form of the Work,excluding those notices that do not pertain to any part ofthe Derivative Works; andstributions of source code must retain the above copyrightnotice, this list of conditions and the following disclaimer.</p><p class="p1">or email info@gopivotal.com. All such requests should clearly specify:OPEN SOURCE FILES REQUESTAttention General CounselPivotal shall mail a copy of the Source Files to you on a CD or equivalentphysical medium. This offer to obtain a copy of the Source Files is valid forthree years from the date you acquired this Software product.</p></body>
</html>4.css盒子模型:
<html><head><title>CSS盒子模型测试</title><style type="text/css">#parent{border:1px solid red;width:500px;/* height:500px; */height:100px;/* padding-left:70px; */margin:0px;}#child{border:1px solid blue;width:150px;height:150px;padding:20px;padding-left:90px;/*设置4个值表示从top位置 顺时针转即:top:12px,right:10px,bottom:20px,left:50px*/padding:12px 10px 20px 50px;margin-top:70px;margin-left:60px;}/* body{ *//* *号表示所有标签 */* {padding:0px;/*border:1px solid green;*/margin:0px;}#star span{border:1px solid #999;width:200px;height:30px;text-align:center;display:block;padding-top:10px;} #star{margin-top:10px;}/* 在html中,有一些标签仅仅只是用来设置文本,诸如:a和span这两个标签而言。在W3C标准中默认不能设置width等样式的,所有设置这些属性是无效的,需要通过display:block之后才有作用.IE例外 */#rock_star{padding:30px;list-style:none;}#rock_star li{border:1px solid red;width:130px;height:40px;text-align:center;}</style></head><body><div id="parent"><div id="child">Hello box model</div></div><ul id="rock_star"><li>窦唯</li><li>张楚</li><li>何勇</li><li>周云蓬</li></ul><div id="star"><span>刘德华</span><span>张学友</span><span>郭富城</span><span>黎明</span></div></body>
</html>