简体   繁体   中英

how to link stylesheet in css

hi i tried to link an style sheet in my html for first time but problem is that it doesnt work i used this code:

 <link href="css/StyleSheet.css" rel="stylesheet" type="text/css" />

but when want to choose an image as my background image i see no result

body {
background-image:url('images/back ground2.jpg');background-attachment:fixed;}

i tryed this before but no changes happened and i searched in w3s and i founed this suggestion(i wrote <link href="css/StyleSheet.css" rel="stylesheet" type="text/css" /> in my head tag and also im using visual studio 2015

Is your images folder inside css folder? If not you will have to give the location of the image as where .. means parent directory of css directory. Hope it helps. It would be helpful to find the error if you share the code and directory structure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM