gpt4 book ai didi

html - 如何强制样式 HTML 元素?

转载 作者:太空宇宙 更新时间:2023-11-03 21:33:51 25 4
gpt4 key购买 nike

我想把我的按钮放在右下角。

这是我尝试过的:

  • 我试过使用 !important,但没有效果

CSS:

#back-to-top {
position: fixed !important;
right:400 !important;
bottom: 17!important;
color: black;
border: #90bc26 solid 1px;
border-radius: 5px;
padding: 5px;
}

这是我在检查我的按钮时看到的:

enter image description here

如您所见,我的 rightbottom 样式被覆盖了,我该如何解决?

最佳答案

您忘记使用 px%em 等测量单位表示右侧和底部:

right:400px;
bottom: 17px;

无需使用 !important

关于html - 如何强制样式 HTML 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27969852/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com