Apply a class AND an attribute selector

前端 未结 2 531
北海茫月
北海茫月 2021-01-28 00:14

I want to style this element:


This is working:

input[class*=\"mysl         


        
相关标签:
2条回答
  • 2021-01-28 01:06

    The selector you're looking for is

    input.myslider[type=range]
    

    Your current code looks for children elements and doesn't target the appropriate element.

    0 讨论(0)
  • 2021-01-28 01:10

    Becuase you are selecting input inside .mySlider. Try this:

    .myslider[type='range'] {
        -webkit-appearance: none;
        width: 100px;
        background-color: black;
        height: 2px;
    }
    

    DEMO

    0 讨论(0)
提交回复
热议问题