CSS属性(二)

字体样式

字体font-family;
字体大小font-size,常用单位为px,百分比;
字体颜色color,有RGB、HEX、name的命名方式;
字体粗细font-weight,normal、bold、bolder、lighter、inherit、100~900;
字体样式font-style,normal、italic(斜体)、oblique(倾斜)
英文字体大小写 text-transform,capitalize(首字母大写)、uppercase(全部字母大写)、lowercase(全部小写)
文字修饰text-decoration,设置下划线、顶划线、删除线、闪烁等。

段落样式

字间距letter-sapcing
段落首字下沉float
段落首行缩进text-indent
段落水平对齐text-align

无序列表

<ul>
    <li><span class="font">[新闻]</span>10万年薪招募球赛解说</li>
</ul>

无序列表样式list-style-type:disc(实心圆)、circle(空心圆)、square(实心方块)、none(不用任何项目符号)

有序列表

<ol> </ol>

还可以使用图片作为列表样式

定义列表

<dl>
<dt>definition term</dt>
<dd>definition description</dd>
</dl>

背景样式

背景颜色background-color
背景图像background-image
背景图像重复方式background-repeat
背景图像位置background-position: length | percentage | top | center | bottom | left | right
固定背景图像background-attachment: scroll | fixed

图片样式

border-style: none | hidden |dotted | dashed | solid | double | groove | ridge | inset | outset
border-top-style:
定义图片上边框样式
border-right-style:
定义图片右边框样式
border-bottom-style:
定义图片下边框样式
border-left-style:
定义图片左边框样式
border-color:
颜色
border-width:
宽度

图片对齐

水平对齐:

#pic1{
    width:730px;
    margin:0px auto 20 px auto;
    padding:10px;
    border:dashed 1px #9FA0A4
    text-align:left;  <!-- center/right -->
}

垂直对齐

vertical-align:baseline | sub | super | top | text-top | middle | bottom | text-bottom | length;

超链接样式

<a></a>

超链接有伪类等概念,也就是超链接有四种状态:没有访问前、鼠标移至对象上、单击超链接、已经访问后。
a:link a:hover a:active a:visited

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值