How to use css triangle with after pseudo element and lower z-index?

后端 未结 1 835
南方客
南方客 2021-01-29 08:28

I have already tried almost all solutions in Stack Overflow related to this issue. I have below CSS code.

.logo {
 background-image: url(\"../Images/Brookland-S         


        
相关标签:
1条回答
  • 2021-01-29 09:25

    Just use position: relative in .logo div

    .logo {
         background-image: url("../Images/Brookland-Splash-
         MOBILE_0000s_0000s_0001_BrooklandPress-CMYK-copy-2.png");
         width:124px;
         height: 131px;
         float: left;
         margin-left: 290px;
         margin-top: 30px;
         margin-bottom: 93px;
         z-index: 10;
         position: relative
     }
    .logo::after {
         content: '';
         border-left: 80px solid transparent;
         border-right: 80px solid transparent;
         border-top: 80px solid white;
         position: absolute;
         width: 0;
         height: 0;
         top: 120px;
         left: 275px;
         clear: both;
    }
    
    0 讨论(0)
提交回复
热议问题