css - 如何在 Bootstrap 中创建视差封面

标签 css

我在创建视差封面时遇到问题

.divcover {
border: #cccccc solid 1px;
background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
min-height: 200px;
vertical-align: bottom;
border: none;
border-radius: 4px 4px 0 0;
margin-top: 20px;
/*margin-bottom: 20px;*/

.divCoverCover {
background-color: rgba(0,0,0,0.4);   
border-radius: 4px 4px 0 0;

此样式包含 textshadow 但这对 Bootstrap 有问题 请帮助我!

最佳答案

这对你有帮助

.divcover {
    border: #cccccc solid 1px;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-blend-mode: multiply;
    color: #fff;
    text-shadow: 1px 1px 0px #bbb;
    position: relative;
    overflow: visible;
    padding-right: 200px;
    min-height: 200px;
    vertical-align: bottom;
    border: none;
    border-radius: 4px 4px 0 0;
    margin-top: 20px;
    /*margin-bottom: 20px;*/
}

.divCoverCover {
    background-color: rgba(0,0,0,0.4);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 4px 4px 0 0;
}

关于css - 如何在 Bootstrap 中创建视差封面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42831471/

相关文章:

jquery - 来自 Google CDN 的 HTTPS 友好的 jQuery CSS 主题

css - 我页面上的这种样式来自哪里?

css - compass 不编译 Sass map

css - 为什么这个 CSS flexbox 示例不能在 IE 11 上运行?

html - 媒体查询改变自己?

html - 如何使用CSS隐藏表格的第二行?

css - 以正确的顺序在 3 列中显示 flex block

javascript - HTML5 Canvas 动画沉淀在底部

html - 响应式背景 - 希望主页的高度为 100%,但图像无法覆盖移动尺寸

css - 边框颜色因继承值而失败