作者:电脑信息网日期:
返回目录:设置问题
需要zd准备的材料分别有:电脑、chrome浏览器、html编辑器。
1、首先,打开html编辑器,新建一个专html文件,例如:index.html,填充问题基础代码。
2、在index.html中的<img>标签,输入html代码:style="margin: 15px 20px 25px 30px;"。
3、浏览器运行index.html页面,此时图片被成功移动了位置到距离左侧30像素属,上方15像素。
<img src="ad-02.jpg" width="400px"; height="200px"; style="position:absolute; left:100px; top:100px; ">修改left 和top的值。
比如:有一个“a”文件夹,里面有“test.html"和”test.jpg"两个文件,test.html中引用test.jpg的话,路径直接写“test.jpg"就行了。
将整个抄DIV定位方式设置成固定定位。袭 下面是测试代码百
<html>
<head>
<title>DIV始终固定在左下角度</title>
<style>
#wrap
{
display:block;
bottom:0px;
left:0px;
position:fixed;
border:1px
solid
#fff;
text-align:center;
}
</style>
</head>
<body>
<div
style="height:3986px;"></div>
<div id="wrap">
<img
src="" />
</div>
</body>