简体   繁体   English

CSS 边框底部

[英]CSS Border bottom

I have a problem with a styling thing.我有一个造型问题。

See preview:查看预览: 在此处输入图像描述

The blue part is an div with an light gradient, the white part is an after with an white SVG.蓝色部分是带有光渐变的 div,白色部分是带有白色 SVG 的后部。 What I want is de red part there comes an image, this means that I need to remove the after with the white SVG.我想要的是红色部分有一个图像,这意味着我需要用白色 SVG 去除后面的部分。 But is it possible to make an border like the white SVG so the white part is transparant?但是是否可以制作像白色 SVG 这样的边框,所以白色部分是透明的?

Hope someone can help me out!希望有人可以帮助我!

Ps.附言。 sorry for my bad English.对不起,我的英语不好。

Current code:当前代码:

    .border-bottom-white::after {
    content: '';
    background-image: url('img/bottom_border_white.svg');
    background-size: cover;
    background-position: bottom right;
    background-repeat: no-repeat;
    display: block;
    width: 100%;
    height: 85px;
    position: absolute;
    bottom: 0;
    right: 0;
}

#topheader {
    position: relative;
    display: block;
    width: 100%;
    background: rgb(20,44,176);
    background: linear-gradient(0deg, rgba(20,44,176,1) 0%, rgba(24,57,191,1) 100%);
        background-size: auto;
    background-image: url('img/header-bg.svg');
    background-position: bottom center;
    background-size: 100% auto;
    padding-top: 15px;
    padding-bottom: 45px;
    transition: min-height 0.5s ease-out;
    -webkit-transition: min-height 0.5s ease-out;
}

I have found the solution guys!我找到了解决方案的家伙!

#topheader{
    position: relative;
    display: block;
    width: calc(100% + 24px);
    background: rgb(20, 44, 176);
    background: linear-gradient(0deg, rgba(20, 44, 176, 1) 0%, rgba(24, 57, 191, 1) 100%);
    background-size: auto;
    background-image: url('img/header-bg.svg');
    background-position: bottom center;
    background-size: 100% auto;
    padding-top: 45px;
    padding-bottom: 45px;
    transition: min-height 0.5s ease-out;
    -webkit-transition: min-height 0.5s ease-out;
    border-bottom-right-radius: 80px;
    transform: rotate(1deg);
    left: -20px;
    top: -30px;
}
#topheader>.container{
    transform: rotate(-1deg);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM