首页 > 其他 > 详细

10月19日笔记

时间:2016-10-20 01:04:11      阅读:252      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>lianxi</title>

<style>

#bj,.tup{

width: 300px;

height: 500px; 

position: relative;

/*relative相对定位 相对于自己原来的位置移动*/

}

#xia{

width: 300px;

height:100px;

background-color: red;

position: absolute;

/*absolute绝对定位,相对于具有position属性的父级元素移动,没有position属性就相对于body移动*/

top: 400px;

opacity: 0.3;

text-align: center;

}

</style>

</head>

<body>

<div id="bj">

<img class="tup" src="./4.png" >

<div id="xia">

<h1>图片说明</h1>

</div>

</div>

</body>

</html>


10月19日笔记

原文:http://12155715.blog.51cto.com/12145715/1863538

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!