我正在使用 CSS 和 position:absolute 强制使用 Squarepace 中未提供的摘要标题叠加功能。这些是我遇到的问题:
将包含 5 张图像的摘要的宽度设置为 20% 我认为可以完全覆盖图片,但每个图像叠加层之间存在间隙。有没有办法使它等于它从中获取的摘要图像的 with?
其次,我试图让 truncate 属性截断行尾的文本,但我无法让它接受任何一个。
这是我正在处理的站点:http://www.sunsetstudiosent.com在页面底部。
这是我目前使用的代码:
.sqs-block-summary-v2 .summary-content {
text-align: left;
position: absolute;
bottom: 0px;
padding: 5px;
margin: 0;
height: 50px;
width: 20%;
text-overflow: ellipsis;
background: rgba(39,39,39,0.5); /* colour of background behind the title and excerpt */
}
.summary-title-link{
text-overflow: ellipsis;
width: 20%;
color: rgba(249,249,249,1) !important; /* color of title links */
}
.sqs-block-summary-v2 .summary-block-setting-show-title .summary-thumbnail-container{
margin-bottom: 0 !important; /* fix to bottom of thumbnail */
overflow: hidden; /* hide anything that doesn't fit */
}
最佳答案
当您设置时,您的问题似乎消失了:
.summary-content {
width: 20.2%;
}
我看到您的类“sql-gallery-design-carousel-slide”的宽度也设置为 20.2%。
关于css - 类等于另一个类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49439146/