is it possible to change default html5 video skin/color

前端 未结 3 1614
时光说笑
时光说笑 2021-02-13 21:22

Is it possible to change default html5 video player\'s colors or complete skin?


<         


        
3条回答
  •  心在旅途
    2021-02-13 21:41

    Yes it is, if your browser supports shadow DOM. On that case you will have selectors available to theme it on css like:

    *::-webkit-media-controls-panel {
       background-color: red !important;
    }
    

    And many other pseudo attributes. To play with it, you can examine the shadow DOM on crome by enabling "Show user agent shadow DOM" on :

    Developer tools -> Settings -> Preferences -> Show user agent shadow DOM

提交回复
热议问题