我有3个框在页面上具有滚动效果,当有人将鼠标移到框上时,它会将内容从段落更改为无序列表,并显示“查看更多”按钮。按钮对齐将不会坐在我告诉它的位置
问题是每个盒子在列表中有不同数量的项目,并且按钮在列表的末尾对齐,我试图将其与盒子的底部对齐。
我尝试了一些建议,我发现通过这些论坛寻找,但仍然无法使其工作。有人可以直接指向我吗?我错过了什么?
页面位于下方,理想情况下,我想将所有按钮对齐到底部,与按钮出现在第一个框中的位置相同。
http://wpdev.quadris.co.uk/what-we-do/
对位IM一起工作的代码如下
\t .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;
\t 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">
\t \t <ul>
\t \t \t <li>Tailored IT Support</li>
\t \t \t <li>Service Desk</li>
\t \t \t <li>Networking Monitoring</li>
\t \t \t <li>Managed Disaster Recovery</li>
\t \t \t <li>IT PRocurement</li>
\t \t \t <li>Managed Security</li>
\t \t \t <li>Co-Location Services</li>
\t \t \t <li>Hosted Services</li>
\t \t \t <li>Domain Management</li>
\t \t \t <li>Security Vulnerability Scanning</li>
\t \t </ul>
\t \t <div class="tagline overtext"><button type="button" class="btn btn-primary btn-lg btn-block"><a href="#">Find Out More</a></button> </div>
\t </div>
</div>
</div>
任何帮助将非常感激。
感谢,
PhilB
位置的按钮abolute,或使用Flexbox的。 – CBroe