Webkit CSS to control the box around the color in an input[type=color]?

后端 未结 11 2036
天涯浪人
天涯浪人 2020-11-28 06:29

Is there a Webkit-specific CSS style that will allow me to control the color/size/style of the box around the color in an input[type=color]?

I\'m setting

11条回答
  •  春和景丽
    2020-11-28 07:17

    My method:

    input { background-color: transparent; border: none; position: relative; width: 80px; height: 12px; &:after { position: absolute; content: ''; display: block; width: 100%; height: 100%; background: url(../img/color-palette.jpg) repeat-y 0 0; background-size: contain; top: 0; border-radius: 3px; } }

    And it view like this: http://prntscr.com/gloozc

    But if you press Ctl+F5, you`ll see original input for a moment.

提交回复
热议问题