css - 类等于另一个类

标签 css overflow overlay summary squarespace

我正在使用 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/

相关文章:

html - CSS - float 元素失去对齐

javascript - 使用 Css 和 jQuery 移动背景图像

jquery - 溢出隐藏的 jQuery 选择器

android - jquery ui 选择菜单不会在 android 浏览器中滚动

CSS IE7 慢覆盖

html - 如何减小文本区域缩进的大小?

html - 溢出:自动给出了一个丑陋的滚动条,我该如何摆脱它?

html - 具有渐变叠加的图像,但文本应在前面(无不透明度)

c++ - Direct2D 和 Direct3D 互操作性的方法

css - 如何在 GWT 中使用 CSS 格式化 ScrollPanel?