gpt4 book ai didi

HTML如何将按钮向右移动

转载 作者:太空宇宙 更新时间:2023-11-04 14:33:58 34 4
gpt4 key购买 nike

抱歉,如果这个问题很愚蠢,因为我只是 HTML 的初学者。如何将我的按钮向右移动?我尝试了一些方法,但似乎没有用。这是我的代码。

<!DOCTYPE html>
<html>
<head>
<title>Sample Dashboard</title>
<style type="text/css">

p.pos_right {
position: relative;
left: 20px;
}

.button_example{
border:1px solid #f9f68a; -webkit-border-radius: 3px; -moz-border-radius: 3px;border-radius: 3px;font-size:12px;font-family:arial, helvetica, sans-serif; padding: 10px 10px 10px 10px; text-decoration:none; display:inline-block;text- shadow: -1px -1px 0 rgba(0,0,0,0.3);font-weight:bold; color: #FFFFFF;
background-color: #fcfac0; background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfac0), to(#f6f283));
background-image: -webkit-linear-gradient(top, #fcfac0, #f6f283);
background-image: -moz-linear-gradient(top, #fcfac0, #f6f283);
background-image: -ms-linear-gradient(top, #fcfac0, #f6f283);
background-image: -o-linear-gradient(top, #fcfac0, #f6f283);
background-image: linear-gradient(to bottom, #fcfac0, #f6f283);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fcfac0, endColorstr=#f6f283);
}

.button_example:hover{
border:1px solid #f7f25f;
background-color: #faf68f; background-image: -webkit-gradient(linear, left top, left bottom, from(#faf68f), to(#f3ed53));
background-image: -webkit-linear-gradient(top, #faf68f, #f3ed53);
background-image: -moz-linear-gradient(top, #faf68f, #f3ed53);
background-image: -ms-linear-gradient(top, #faf68f, #f3ed53);
background-image: -o-linear-gradient(top, #faf68f, #f3ed53);
background-image: linear-gradient(to bottom, #faf68f, #f3ed53);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startC olorstr=#faf68f, endColorstr=#f3ed53);
}
</style>
</head>
<body>

<p class="pos_right">Most Number of Referrals for the month of </p>
<a class="button_example" href="#"><font color="black">UPDATE</font></a>


</body>
</html>

最佳答案

有很多方法可以做到这一点,例如 float

.button_example {float: right}

关于HTML如何将按钮向右移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30206805/

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