【问题标题】:Notepad ++ CSS not linking to HTML (twitter bootstrap)记事本 ++ CSS 未链接到 HTML(twitter 引导程序)
【发布时间】:2016-06-20 06:27:23
【问题描述】:

我在这里看到了一些关于问题的答案。还是找不到。使用记事本++...

index.html 文件

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8"> 

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"    
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/
css/bootstrap.min.css">

<!-- jQuery library -->
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.j    s"></script>

<!-- Latest compiled JavaScript -->
<scriptsrc="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.    js"></script>

<!-- the main css sheet -->
<link type="text/css" rel="main" href="main.css"> 

</head>


<body>  <p>This is a test.</p> </body>

main.css 文件

p{
    font-size: 250px;
 }

上面的css对html没有任何影响

我在尝试将背景图像添加到引导 jumbotron 时遇到了问题。 不过,在 google chrome 上作为源查看后,样式表似乎是链接的。
可能出了什么问题?

下面是我本地机器上文件结构的图片。

File Structure..

我已经把css和html放到了网站文件夹中...

【问题讨论】:

  • 为什么属性值中有空格?
  • 试试这个:&lt;link rel="stylesheet" type="text/css" href="main.css"&gt;
  • 你指的是什么?
  • @Nilzone- 我试过了......它仍然没有修改 p 标签之间的文本......我很确定没有拼写错误。大声笑
  • 添加您的文件夹结构的图片 - 这很可能是您的问题所在。

标签: html css notepad++


【解决方案1】:

与您使用的程序无关。

看起来这里可能存在多个问题。

  1. 修复网址中间的换行符href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/ css/bootstrap.min.css">

  2. 试试这个

  3. 确保链接源正确,尽管它显示在您的屏幕截图中

【讨论】:

    【解决方案2】:

    也许您的 main.css 文件位于 css 文件夹中。在这种情况下,你需要把 css/main.css

    【讨论】:

      猜你喜欢
      • 2012-04-09
      • 1970-01-01
      • 2014-03-14
      • 2018-04-01
      • 1970-01-01
      • 2016-10-10
      • 2018-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多