web前端复习第八课2

                                           文本阴影案例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		h1 {
			font:100px/200px "微软雅黑";
			text-align: center;
			color: #fff;
			text-shadow: 2px 2px 4px #000;
		}
	</style>
</head>
<body>
	<h1>中国</h1>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		h1 {
			text-shadow: 0 0 20px #fefcc9, 10px -10px 30px #feec85, -20px -20px 40px #ffae34, 20px -40px 50px #ec760c, -20px -60px 60px #cd4606, 0 -80px 70px #973716, 10px -90px 80px #451b0e; font-family:Verdana, Geneva, sans-serif; font-size:100px; font-weight:bold; color:white;
		}
	</style>
</head>
<body>
	<h1>中国</h1>
</body>
</html>

对比下两个有什么区别

                                               文字描边

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		h1 {
			font:100px/200px "微软雅黑";
			text-align: center;
			color: #fff;
			text-shadow: 2px 2px 4px #000;
		}
	</style>
</head>
<body>
	<h1>中国</h1>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		h1{
			/*文字描边。在文字周围描线*/
			-webkit-text-stroke: 2px red;
		}
	</style>
</head>
<body>
	<h1>中国</h1>
</body>
</html>

                                             网络字体

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		@font-face{
			/*创建一个字体的名字*/
			font-family: myfont;
			src: url('font/aaaaa.ttf');
		}
		/*网络字体:通过@font-face属性去定义  
		通过src: url(font/DFPHaiBaoW12-GB.ttf);去引入字体源文件*/
		p{
			font-family: "myfont";
		}
	</style>
</head>
<body>
	<p>
		hello word 你好
	</p>
</body>
</html>

                                              边框圆角

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box1{
			width: 200px;
			height: 200px;
			background-color: red;
			float: left;
			
			/*控制右上角*/
			border-top-right-radius: 200px;
			border-bottom-left-radius: 200px;

			/*也可以简写,一次性控制所有角*/
		}
		.box2{
			width: 200px;
			height: 200px;
			background-color: green;
			float: left;

			/*控制右上角*/
			border-top-left-radius: 200px;
			border-bottom-right-radius: 200px;
		}
		.box3{
			width: 200px;
			height: 200px;
			background-color: blue;
			float: left;

			/*控制右上角*/
			border-top-left-radius: 200px;
			border-bottom-right-radius: 200px;
		}
		.box4{
			width: 200px;
			height: 200px;
			background-color: yellow;
			float: left;

			/*控制右上角*/
			border-top-right-radius: 200px;
			border-bottom-left-radius: 200px;
		}
		.box{
			width: 400px;
			height: 400px;
			margin: 100px auto;
		}
		.box:hover{
			transform: rotateZ(3600deg);
			transition: all 5s;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="box1"></div>
		<div class="box2"></div>
		<div class="box3"></div>
		<div class="box4"></div>
	</div>
</body>
</html>

                                              盒子阴影

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 300px;
			background-color: #fff;
			margin: 0px auto;
			/*box-shadow:inset 0px 0px 0px 0px blue;*/
			/*盒子阴影。inset不是必选项,可以让阴影往里面扩散  x轴  y轴  迷糊半径  扩展阴影半径   颜色*/		
			box-shadow: 0px 20px 10px #ccc;
		}
		
	</style>
</head>
<body>
	<div class="box">

	</div>
</body>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

思丰百年

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值