0
点赞
收藏
分享

微信扫一扫

动手实践,使用div盒子模型设计一个播放器效果/动手实践

东言肆语 2022-01-31 阅读 46
css3csshtml

题目效果

在这里插入图片描述

执行代码

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>动手实践</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.box1{
			width: 500px;
			height: 500px;
			background-image: linear-gradient(to bottom, 
				rgb(79,48,89) 20%, rgb(190,160,198)50%, rgb(126,67,92) 80%);
			position:relative;
		}
		.box2{
			width: 300px;
			height: 300px;
			background-image: linear-gradient(120deg, 
				rgb(126,67,92) 20%, rgb(79,48,89) 80%);
			position:absolute;
			top:0;
			left:0;
			right:0;
			bottom:0;
			margin:auto;
			border-radius: 10%;
		}
		.box3{
			width: 180px;
			height: 150px;
			border: #010101 solid 30px;
			background-image: linear-gradient(160deg, 
				rgb(246,159,133) 10%, rgb(149,69,84) 60%);
			position:absolute;
			top:0;
			left:0;
			right:0;
			bottom:0;
			margin:auto;
			border-radius: 10%;
		}
		.box4{
			width: 100px;
			height: 100px;
			position:absolute;
			background-color: white;
			border:solid 1px white;
			top:0;
			left:0;
			right:0;
			bottom:0;
			margin:auto;
			border-radius: 50%;
		}
		.box5{
			width: 0px;
			height: 0px;
			border-left: 25px solid;
			border-right: none solid;
			border-bottom: 25px solid transparent ;
			border-top: 25px solid transparent ;
			position:absolute;
			top:0;
			left:0;
			right:0;
			bottom:0;
			margin:auto;
		}
	</style>
</head>
<body>
	<div class="box1">
	  <div class="box2">
		  <div class="box3">
			  <div class="box4">
				  <div class="box5">
				  </div>
			  </div>
	    </div>
		</div>
	</div>
</body>
</html>

最终效果

在这里插入图片描述

举报

相关推荐

0 条评论