CSS样式_入门学习p5

``<html>
``<head>
```<title>CSS字体属性</title>
```<style type="text/css">
````h1 {font-family:宋体; font-size: 30pt; font-style:italic; font-weight:bold}
````p {font:20pt Arial}
```</style>
``</head>
``<body>
```<h1>字体属性的设置</h1>
```<p>Where there is a will, there is a way.</p>
``</body>
``</html>
`3.2 text-decoration(文字修饰属性)
```underline:`  下划线。
``   overline:`   上划线。
``   line-through:   删除线。
``   blink:``  闪烁。
``   none:``   无任何修饰。
``eg
```p.through {text-decoration:line-through}
`4 CSS属性-设置文本布局
`4.1 word-spacing(字间距)与line-height(行间距)  单位可以为in(英寸)、cm(厘米)、mm(毫米)、pt(点)、px(像素)。
```eg
````<style type="text/css">
`````p{line-height:20pt}
`````#line1{word-spacing:10pt}
`````#line2{word-spacing:20pt}
````</style>
`4.2 text-align(文字对齐)
``   left:左对齐。
``   center:居中对齐。
``   right:右对齐。
``   justify:两端对齐。
`4.3 text-indent(首行缩进)
```eg p{text-indent:24pt}

`5 CSS属性-设置颜色及背景
`5.1 color(颜色属性)
``h1{color:#ff00ff}
``p{color:blue}
`5.2 background-color(背景颜色属性)
``p{background-color:blue; color:white; font-size: 20pt;}
`5.3 background-image(背景图像属性)
``<html>
``<head>
```<title>CSS背景图像</title>
```<style type="text/css">
```<!--
````body{background-image:url(bg.jpg)}
```-->
```</style>
``</head>
``<body>
``</body>
``</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值