嗨,我有一个问题,我的代码看起来像这样(我是初学者)
<div class="backtotop">
<a href="#top">
Back to topˆ
</a>
</div>
我的样式表有
.backtotop{
font-size: 30px;
width: 20%;
background-color: #b6aeac;
text-align: right bottom;
}
a{
text-decoration: none;
font-size:30px;
font-style: normal;
color: #23285a;
}
但它不对齐
我想在页面右下角显示它,但我不希望它被修复。
The picture of absolute code used
它回到我正在制作的顶部底部
最佳答案
.backtotop {
font-size: 30px;
width: 20%;
background-color: #b6aeac;
position: fixed;
bottom: 0; // adjust as per need
right: 0; // adjust as per need
}
关于HTML 无法对齐到页面右下角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40583880/