Home > Blockchain >  How to disable a part of css property in safari?
How to disable a part of css property in safari?

Time:06-10

I got a div and it got certain property of css. What I want to do is I want to give the div certain color on safari is this possible?

<div >Example div</div>

css

. divClass{
  width: 50px;
  height: 50px;
  background-color:'red'

  //safari only
  // background-color:'blue'
  //
}

CodePudding user response:

This worked for me.

@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance: none) {
   .divClass {
       background: red;
    }
  }
}

hope it helps.

  •  Tags:  
  • css
  • Related