Blogger Information
Blog 9
fans 0
comment 0
visits 7710
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
相对定位实现十字花
漠漠
Original
635 people have browsed it

实例

<!DOCTYPE html>
<html>
<head>
	<title>相对定位做十字</title>
	<meta charset="utf-8">
</head>
<style type="text/css">
	.box1{
		width: 200px;
		height: 200px;
		background: lightblue;
		text-align: center;
		line-height: 200px;
		position: relative;
		left:200px;
	}
	.box2{
		width: 200px;
		height: 200px;
		background: lightgreen;
		text-align: center;
		line-height: 200px;
		position: relative;
		left:400px;
	}
	.box3{
		width: 200px;
		height: 200px;
		background: lightcoral;
		text-align: center;
		line-height: 200px;
		position: relative;
		left:200px;
	}
	.box4{
		width: 200px;
		height: 200px;
		background: lightgray;
		text-align: center;
		line-height: 200px;
		position: relative;
		top:-400px;
	}
	.box5{
		width: 200px;
		height: 200px;
		background: wheat;
		text-align: center;
		line-height: 200px;
		position:relative;
		top:-600px;
		left:200px;
	}
</style>
<body>
	<div class="box1">1</div>
	<div class="box2">2</div>
	<div class="box3">3</div>
	<div class="box4">4</div>
	<div class="box5">5</div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post