我需要设置一个 div 的样式,以便它与页面一起向下滚动并且不会像这样卡在浏览器的左侧:
#flyingDIV{
position:fixed;
top:160px;
left:0px;
}
相反,我需要将其固定在右侧。提前谢谢。
#flyingDIV{
position:fixed;
top:160px;
right:0px;
}
Seems like you are new to css
, I'll recommend this tutorial link for you http://learnlayout.com/
This website help you learn - How to design a good layout using CSS
#flyingDIV
{
position:fixed;
top:160px;
right:0px;
}
To set it from bottom of your page you can use
bottom :20px;
你试过漂浮吗?
#flyingDIV {
float: right;
}
这是否有效取决于您在页面上围绕您尝试向右对齐的 div 周围的其他内容。