Blogger Information
Blog 32
fans 0
comment 0
visits 19927
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0404
XuanGG的博客
Original
1024 people have browsed it

实例

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>样式</title>
	<style type="text/css">
.c{
	color: red;
}



.box1 {
			width: 300px;
			height: 300px;
			background-color: wheat;

			position: relative;

		}

		.box2 {
			width: 100px;
			height: 100px;
			background-color: coral;

			position: absolute;
			top: 50px;
			left: 100px;

</style>
</head>
<body>
	<p>卫庄</p>
<img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1523185458556&di=bce75b3dff205ad854fe1b7f48eb65b3&imgtype=jpg&src=http%3A%2F%2Fimg4.imgtn.bdimg.com%2Fit%2Fu%3D4106874994%2C1293263125%26fm%3D214%26gp%3D0.jpg">

<div class="box1">
		<div class="box2"></div>
	</div>

</body>
</html>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
<script type="text/javascript">
var a = $('img').attr ('width',200)
var b = $('img').css('height',200)
var res = $('img').offset()
$('p').addClass('c')

var res = $('.box2').position().left
</script>

运行实例 »

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


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