CSS not working in stylesheet

前端 未结 7 1143
傲寒
傲寒 2020-12-11 16:52

I have a set of Styles that were first created inside the style attribute on a page.

I want to move it from being on the page itself into a stylesheet.

howe

7条回答
  •  我在风中等你
    2020-12-11 17:26

    You should make sure the stylesheet is properly imported. Sometimes the @import doesn't work well if not used accordingly, so always reference your stylesheet:

    Always remember to close the tag as it's a self-close tag. I think @zzzzBov forgot to mention that.

    Finally, if that doesn't work, try to override some of the styles by physically writing (above the section) something like:

    
    

    and see if that gives you a blue background and red colored text. It should. After that, try to implement the referencing method and make sure you reference the stylesheet file to the right directory.

    Good luck!

提交回复
热议问题