html5定义图片固定位置

html-css08

html5定义图片固定位置,第1张

css代码:

{

    position:fixed

    left:0

    top:0

}

把这个样式给image用就行了

将整个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>

</html>