将透明图像设为页脚

时间:2018-05-31 03:50:56

标签: css

大家好我是css的新手,我想简单地按照这样做:

Footer

所以紫色是菜单中的一行,可以合并(页脚后面的内容)与其内容(黄色)..

这就是我所做的但没有奏效的

<style>
.footer-start {
    background-image: url('img/footer-line.png');
    background-size: cover;
    height: 31px;
    position: relative;
    z-index: 9999;
    display: block;
}
.footer {
    background-color: #a85a96;
    height: auto;
    font-family: trickpony;
    padding-top: 50px;
    padding-bottom: 50px;
    min-width: 1374px;
    margin: 0;
}
</style>
<div class="footer-start"></div>
 <div class="footer">
</div>

但它看起来像This

由于

1 个答案:

答案 0 :(得分:1)

您是否正在寻找此信息,请检查代码......

&#13;
&#13;
.main-container {
position: relative;
}
.footer-start {
    background: url('https://fringetoronto.com/sites/default/files/images/kidsfest-footer-1600x350.png') bottom left;
    background-size: cover;
    height: 200px;
    position: absolute;
    z-index: 9999;
    bottom: 0px;
    left:0px;
    min-width: 1374px;
}
.footer {
    background-color: #a85a96;
    height: 250px;
    font-family: trickpony;
    padding-top: 50px;
    padding-bottom: 50px;
    min-width: 1374px;
    margin: 0;
    position: relative;
}
&#13;
<div class="main-container">
<div class="footer-start"></div>
<div class="footer"></div>
</div>
&#13;
&#13;
&#13;