[英]Regarding the Link / text / image that stays static even when the webpage is scrolled
are there any Java script or any sample available for the Link / text / image that stays static even when the webpage is scrolled. 是否有Java脚本或任何可用于链接/文本/图像的示例,即使滚动了网页,它们也保持静态。
I am looking for something similar to the one on the bottom left side of the webpage borders(Helpful?, "Yes", "No"). 我正在寻找类似于网页边框左下角的内容(有用吗?,“是”,“否”)。
http://www.ehow.com/facebook-for-business/ http://www.ehow.com/facebook-for-business/
Regards, Gourav 问候,古拉夫
Try this code this may help you. 尝试使用此代码可能会对您有所帮助。 but this code required lot more css and javascript code to make this same as ehow.
但是此代码需要更多的CSS和javascript代码才能与ehow相同。
<style>
.mainDiv {
height: 1000px;
border: solid 1px #000000;
}
.fixDiv {
height: 250px;
width: 20px;
border: solid 1px #000000;
position: fixed;
margin-top: 200px;
}
</style>
<html>
<body>
<div class="fixDiv">h e l p f u l l? Yes No</div>
<div class="mainDiv">Gaurav</div>
</body>
</html>
This can be done using simple css 这可以使用简单的CSS完成
create a style for div with id="poll" and give this style 用id =“ poll”为div创建一个样式并给出该样式
div#poll { position: fixed; div#poll {位置:固定; left: 0;
左:0; top: 100px;
顶部:100px; }
}
<div id="poll">
<img src="image.jpg" alt="image" class="contimage" border="0"/></div>
This div will be shown in the left side of the window 该div将显示在窗口的左侧
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.