gpt4 book ai didi

html - 按钮对齐不会位于我告诉它的位置

转载 作者:可可西里 更新时间:2023-11-01 13:25:11 24 4
gpt4 key购买 nike

我在页面上有 3 个带有滚动效果的框,当有人将鼠标悬停在框上时,它会将内容从一个段落更改为带有“查看更多”按钮的无序列表。

问题是每个框在列表中都有不同数量的元素,并且按钮在列表的末尾对齐,我试图将它对齐到框的最底部。

我已经尝试了一些我在这些论坛中找到的建议,但仍然无法实现。有人能直接指出我正确的方向吗?我错过了什么吗?

页面在下面,理想情况下我想将所有按钮对齐到底部,与按钮出现在第一个框中的位置相同。

http://wpdev.quadris.co.uk/what-we-do/

我使用的bit代码如下

	.box {

cursor: pointer;
height: 340px;
position: relative;
overflow: hidden;
width: 100%;
}

.box .fa {
position: relative;
margin-top: 40%;
left: 43%;
font-size: 48px;
}

.box h2 {
text-align: center;
position: absolute;
font-size: 24px;
left: 5%;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.box p{
text-align: center;
position: relative;
top: 30%;
padding: 3%;
padding-top: 0;
}
.box .overbox p {
text-align: center;
color: #fff;
font-size: 16px;
}
.box .overbox {
background-color: #424545;
position: absolute;
top: 0;
left: 0;
color: #fff;
z-index: 100;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
opacity: 0;
width: 100%;
height: 340px;
padding: 30px 20px;

}

.box:hover .overbox { opacity: 1; }

.box .overtext {
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
transform: translateY(40px);
-webkit-transform: translateY(40px);
}

.box .title {
font-size: 16px;
text-transform: none;
opacity: 0;
transition-delay: 0.1s;
transition-duration: 0.2s;
}

.box:hover .title,
.box:focus .title {
opacity: 1;
transform: translateY(0px);
-webkit-transform: translateY(0px);
}

.box .tagline {
font-size: 0.8em;
color:#fff;
opacity: 0;
transition-delay: 0.2s;
transition-duration: 0.2s;
}

.box:hover .tagline,
.box:focus .tagline {
opacity: 1;
transform: translateX(0px);
-webkit-transform: translateX(0px);
color: #fff;
}

.box .overbox .btn-primary {
position: relative;
bottom: 0;
background-color: #9e3039;
color: #fff;
border-style: none;

}
.box .overbox .btn-primary a, a:hover {
color: #fff;
}
<div class="box"> <h2>Managed IT Solutions</h2>

<p>No matter what your IT requirement is, we can help.
Whether you are looking for a fully managed IT service or one tailored to supplement your internal team, we have a solution for you.
</p>
<i class="fa fa-gg"></i>
<div class="overbox">
<div class="title overtext">
<ul>
<li>Tailored IT Support</li>
<li>Service Desk</li>
<li>Networking Monitoring</li>
<li>Managed Disaster Recovery</li>
<li>IT PRocurement</li>
<li>Managed Security</li>
<li>Co-Location Services</li>
<li>Hosted Services</li>
<li>Domain Management</li>
<li>Security Vulnerability Scanning</li>
</ul>
<div class="tagline overtext"><button type="button" class="btn btn-primary btn-lg btn-block"><a href="#">Find Out More</a></button> </div>

</div>
</div>
</div>

任何帮助将不胜感激。

谢谢,

菲尔布

最佳答案

height:90% 设置为您的类 .text 从而将您的按钮放置在 .overbox 的底部。

.box .title {
font-size: 16px;
text-transform: none;
opacity: 0;
transition-delay: 0.1s;
transition-duration: 0.2s;
height: 90%; /*Add this*/
}

关于html - 按钮对齐不会位于我告诉它的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39659894/

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