第3篇:css常用属性(CSS)

css常用属性

文本属性

 字体属性

背景属性

列表属性

表格属性

例子

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>css属性</title>
		<style type="text/css">
			body{
				background-image: url(../img/bg.JPG);
				background-attachment: scroll;
				color: white;
			}
			.one{
				text-indent: 30px;
				line-height: 20px;
				letter-spacing: 5px;
				text-decoration: none;
				text-align: left;
				text-transform: none;
				word-spacing: 3px;
				font-weight: bold;
			}
			.two{
				line-height: 60px;
				letter-spacing: 2px;
				text-decoration: overline;
				text-align: justify;
				text-transform: uppercase;
				word-spacing: 20px;
			}
			.three{
				line-height: 30px;
				letter-spacing: 4px;
				text-decoration: line-through;
				white-space: pre-wrap;
				word-spacing: 10px;
			}
			.four{
				text-indent: 30px;
				text-decoration:underline;
				white-space:pre-line;
			
			}
			.five{
				text-indent: 30px;
				text-decoration:underline;
				white-space:pre-wrap;	
				font-size: large;	
				font-style: oblique;	
			}
		</style>
	</head>
	<body>
		<p class="one">
		Therefore, it is imperative for us, people in all walks, to take drastic measuresto reverse thisdisturbing trend.			
		由于Django是在一个快节奏的新闻编辑室 环境下开发出来的,因此它被设计成让普 通的网站开发工作简单而快 捷。以下简单 介绍了如何用 Django 编写一个数据库驱 动的Web应用程序。 
		</p>
		<p class="two">
		If we do not desire the trend to become a reality in the future, positive steps must be taken to put anend to sth right now.			
		由于Django是在一个快节奏的新闻编辑室 环境下开发出来的,因此它被设计成让普 通的网站开发工作简单而快 捷。以下简单 介绍了如何用 Django 编写一个数据库驱 动的Web应用程序。 
		</p>
		<p class="three">My suggestion, to put an end to the negative situation, are the following steps.
			由于Django是在一个快节奏的新闻编辑室 环境下开发出来的,因此它被设计成让普 通的网站开发工作简单而快 捷。以下简单 介绍了如何用 Django 编写一个数据库驱 动的Web应用程序。 </p>
		<p class="four">the most           important thing, confronted the current situation, is not to say, but instead to do.由于Django是在一个快节奏的新闻编辑室 环境下开发出来的,因此它被设计成让普 通的网站开发工作简单而快 捷。以下简单 介绍了如何用 Django 编写一个数据库驱 动的Web应用程序。 
		</p>
		<p class="five">the most             important thing, confronted the current situation, is not to say, but instead to do.由于Django是在一个快节奏的新闻编辑室 环境下开发出来的,因此它被设计成让普 通的网站开发工作简单而快 捷。以下简单 介绍了如何用 Django 编写一个数据库驱 动的Web应用程序。 
		</p>



	</body>
</html>

例子

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>css属性</title>
		<style type="text/css">
			body{
				margin: 30px;
				text-align: center;
			}
			*{margin: 0px ;padding: 0px;}
			.one{
				list-style-type: none;
				border: 1px solid red;	
				background: antiquewhite;			
			}
			.dd{
				display: inline;
				padding:0px 10px;
				border-right: 1px solid firebrick;
				
			}
			.lis{
				border-right: 0px;
			}
			.two{
				list-style-type: none;
				width: 100px;
				border: 1px solid red;
			}
			.kk{
				border-bottom: 1px solid red;
				padding: 8px 0px;
				background: antiquewhite;
				
			}
			.kk>.list{
				border-bottom: 0px;
			}
			table.table1{
				border-collapse: collapse;
			}
			table.table2{
				border-spacing: 10px 8px;
			}
			table,th,td{
				width: 550px;
				border: 1px solid burlywood;
			}
		</style>
	</head>
	<body>
		<ul class="one" >
			<li class="dd">菜单1</li>
			<li class="dd">菜单2</li>
			<li class="dd">菜单3</li>
			<li class="dd">菜单4</li>
			<li class="dd">菜单5</li>
			<li class="dd">菜单6</li>
			<li class="dd lis">菜单7</li>
		</ul>
		<br />
		<ul class="two" >
			<li class="kk">菜单1</li>
			<li class="kk">菜单2</li>
			<li class="kk">菜单3</li>
			<li class="kk">菜单4</li>
			<li class="kk">菜单5</li>
			<li class="kk">菜单6</li>
			<li class="kk list">菜单7</li>
		</ul>
		<br />
		<table class="table1">
			<tr>
			<th>姓名</th>
			<th>学号</th>
			<th>英语</th>
			<th>语文</th>
			<th>数学</th>
			</tr>			
			
			<tr>
				<td>YanHSama</td>
				<td>201</td>
				<td>80</td>
				<td>80</td>
				<td>90</td>
			</tr>
		</table>
		<br />
		<table class="table2">
			<tr>
			<th>姓名</th>
			<th>学号</th>
			<th>英语</th>
			<th>语文</th>
			<th>数学</th>
			</tr>			
			
			<tr>
				<td>YanHSama</td>
				<td>201</td>
				<td>80</td>
				<td>80</td>
				<td>90</td>
			</tr>
		</table>
	</body>
</html>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值