How to stop flash of unstyled content

后端 未结 3 2021
生来不讨喜
生来不讨喜 2020-12-15 13:30

This is just a short question, I don\'t really have an example but the I am using a bespoke cms and at present we have no access to the head of the web page so some css has

3条回答
  •  时光说笑
    2020-12-15 13:44

    Fix for FOUC that does not require javascript:

    At the top of your HTML:

     
     
    
         
    

    At the end of your last .css file:

    html {
         visibility: visible;
         opacity: 1; }
    

    https://gist.github.com/electrotype/7960ddcc44bc4aea07a35603d1c41cb0

提交回复
热议问题