CSS mening saytni yangilamaydi

Bugungi kunda onlayn-udemy kursini boshladim va ularning dastgohlari uchun bootstrap andozalarini ishlatmoqdaman. lekin menda muammo bor, chunki saytni qayta yuklashda hech qanday CSS qo'llanilmadi (ps kurs juda qadimgi va men sizni tezroq menga yordam bera olishiga shubha qilaman)

Har qanday yordam katta minnatdor bo'ladi.

Bu mening papkalarni sozlash:

1

Bu men CSS papkasida nima bor:

2 This is the code i have:

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

<!DOCTYPE HTML>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Jumbotron Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="first-site/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="jumbotron.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    
1
(Ikkinchi havola - CSS jildi - buzilgan)
qo'shib qo'ydi muallif ValLeNain, manba
Sizning index.html fayli allaqachon "birinchi sayt" papkasida joylashgan, shuning uchun buni CSS fayli yo'lidan oling, masalan.
qo'shib qo'ydi muallif James King, manba
Buni yuborishdan avval <link href = "css/bootstrap.min.css" rel = "stylesheet"> bir necha turdagi harakat qildim, lekin men bir xil natijaga erishdim
qo'shib qo'ydi muallif ethan.p, manba

7 javoblar

All the <link> and <script> tags in your <head> refer to folders and elements that you don't seem to have in your project.

0
qo'shib qo'ydi

Tegishli fayl joyidan foydalaning. buni sinab ko'ring ............

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

<!DOCTYPE HTML>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="image/favicon.ico">

    <title>Jumbotron Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/jumbotron.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    
0
qo'shib qo'ydi
papka sozlamalari yaxshi! rasm joylashuvi uchun rasm jildini yarating
qo'shib qo'ydi muallif Momin, manba

Sizning strukturangiz qanday ko'rinishini aniq bilmayman, buni taxmin qilishni emas, balki sizga Bootstrapning CDN versiyasidan foydalanishni taklif qilaman  Buni o'zgartirishingiz mumkin

<link href="first-site/css/bootstrap.min.css" rel="stylesheet">

bu bilan

 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

va bu

<script src="../../dist/js/bootstrap.min.js"></script>

bu bilan

<script async="async" type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
0
qo'shib qo'ydi
Albatta, sizning CSS va JS aktivlariga qarindoshlaringizning yo'llari to'g'ri yozilmagan, ammo siz aytganlarim kabi CDN dan olganingizda, sizning dastlabki aktivlaringiz tarmoq serverlaridan yuklanadi va sizning saytingizning yo'l tuzilishiga bog'liq bo'lmaydi
qo'shib qo'ydi muallif Evrard-c, manba
Agar ushbu javob sizga yordam bergan bo'lsa, yuqoriga ko'tarish yoki yaxshi javob sifatida belgilashni so'raymiz
qo'shib qo'ydi muallif Evrard-c, manba
Bu sizga rahmat. lekin nima uchun bu boshqa ish emas, balki ishlaydi?
qo'shib qo'ydi muallif ethan.p, manba

Qarang! index.html faylingiz ba'zi CSS va JS fayllariga kirishga harakat qilmoqda.

ok .. here is the basic structure of your directory:enter image description here

first-site saytida joylashgan index.html bootstrap.min.css ga kirish uchun CSS papkasini tanlang.

shuning uchun siz ushbu qatorni o'zgartirishingiz kerak:

<link href="first-site/css/bootstrap.min.css" rel="stylesheet">

bu bilan:

<link href="css/bootstrap.min.css" rel="stylesheet">

va shunga o'xshash tarzda yuqoridagi misol kabi katalog tuzilishingizga mos ravishda <link> qatorlarini o'zgartirishingiz kerak.

Umid qilamiz.

0
qo'shib qo'ydi

Fayl tuzilishidan bootstrap CSS href noto'g'ri.

correct: <link href="css/bootstrap.min.css" rel="stylesheet">

0
qo'shib qo'ydi

Bu havola yorlig'i noto'g'ri yo'l beradi

<!-- Bootstrap core CSS -->
<link href="first-site/css/bootstrap.min.css" rel="stylesheet">

Index.html ga nisbatan yo'llarni ko'rsatishingiz kerak. Buni quyidagicha o'zgartiring:

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
0
qo'shib qo'ydi

Sizning papkangizning tuzilishi shunday bo'lsa:

folder-name > 1)css folder 2) JS folder 3)images folder ...... 5)index.html

keyin sizning bog'lanish yorlig'ida dono kabi foydalaning

<link rel="stylesheet" href="css/bootstrap.css">
<script src="js/jquery.js"></script>
0
qo'shib qo'ydi