html-列表-布局-选择器

无序列表

用粗体圆点标记,必须有ul嵌套在外边

<ul>
<li>Coffee</li>
<li>Mike</li>
</ul>

  • Coffee
  • Mike

有序列表

通过数字进行标记,必须有ol嵌套在外边

<<ol>
<<li>Coffee</li>
<<li>Milk</li>
<</ol>

  1. Coffee
  2. Milk

HTML布局

London

London is the captial city of England.It is the most populous city in the Unite Kindom,with a metropolitan areaof over 13 million inhabitants.

Standing on the River Thanes,London has been a major settlement for two millenia,its history going back to its founding by the Romans,who named it Londinium.

widthheightbr
宽度高度换行符

选择器

id选择器

#sample p {
font-style: italic;
text-align: right;
margin-top: 0.5em; }
<div id="sample">
<p>nihao</p>
</div>

由于id是一个盒子身份的象征,只能存在一个,所以做的样式只能被对应id的盒子引用,但是可以这样->即用作 --------------派生选择器
#sample p{ }
#sample h1{ }

  1. 还可以这样

<style type="text/css">
table,th,td{
border:1px solid blue;
}
</style>

—这样可以同时不用的元素应用一个样式,但是是对全局的—

类选择器

.cemter{
text-align: center}

<h1 class="center">
this heading will be center-alignd
</h1>

一个样式可以被多个盒子选择引用,不像id需要单独为一个盒子做样式,同样的,class也可以用做----------派生选择器—>>类名是sample的盒子里面的td表格单元全是sample类型的样式

.sample td {
color: #f60;
background: #666;
}
<div class="sample">
<td>123</td>
</div>

响应式Web设计(Responsive Web Design)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值