CSS文本属性

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#box{
				width:300px;
				height:100px;
				background:pink;
				
				line-height:normal;/*行高 默认值*/
				line-height:20px;/*文本内容垂直对齐方式*/
				
				font: italic bold 30px/100px "微软雅黑";
				
				text-align:left;/*文本水平对齐方式*/
				text-align:center;
				text-align:right;
				text-align:justify;/*两端对齐*/
			}
			#box1{
				width:250px;
				height:100px;
				background:gold;
				text-align:justify;
			}
			
			a{
				text-decoration:none;/*文本修饰:取消;*/
			}*/
			.txt1{
				text-decoration:underline;/*添加下划线*/
			}
			.txt2{
				text-decoration:line-through;/*添加中划线*/
			}
			.txt3{
				text-decoration:overline;
			}
			#box2,#box3{
				width:400px;
				background:pink;
				font-size:30px;
			}
			#box2{
				text-indent:2em;/*首行缩进 2*30*/
				letter-spacing:0px;/*字符间距*/
			}
			#box3{
				text-indent:60px;
				word-spacing:0px;/*词间距*/
			}
			
		</style>
	</head>
	<body>
		<!--
			行高:
				line-height:文本垂直对齐方式;
					行高值 < 高度	值	偏上
					行高值 = 高度	值	居中
					行高值 > 高度值	偏下
				
			综合写法
				font:倾斜 加粗 文本大小/行高 字体类型;
				注: 有顺序要求
				
			文本水平对齐方式
				text-align:;
					left 左对齐
					center	水平居中
					right	右对齐
					justify	两端对齐
					
			文本修饰:
				text-decoration:;
					none	没有修饰
					overline	上划线
					line-through	中划线
					undeline	下划线
					
			首行缩进:
				text-indent:;
					px
					em
					
			字符间距:
				letter-spacing:;
					px
					em
			词间距
				word-spacing:;
					px
					em
			
		-->
		<div id="box">文本内容!</div>
		<div id="box1">哈哈哈哈哈哈哈哈哈哈哈哈hahahahha</div>
		<a href="#">超链接自带下划线</a>
		<p class="txt1">惊爆价</p>
		<p class="txt2">原价</p>
		<p class="txt3">不知道什么价不知道什么价</p>
		
	</body>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值