html - header 未使用 CSS 更改样式,但其他 div 是

标签 html css raspberry-pi webserver apache2

我正在尝试让我的标题背景使用 css 更改颜色,但是除了我的导航位置之外,我无法更改任何其他内容 <div> .

https://jsfiddle.net/70d40nnt/2/

<style type="text/css">
#header {
    background:#7D72F7;
    text-align:center;
    padding:5px;
}
.clearfix {
    overflow: auto;
}
#nav {
    line-height:30px;
    background-color:#eeeeee;
    height:200px;
    width:150px;
    float:right;
    padding:5px; 
    text-align:center;
}
#section {
    width:350px;
    padding:10px; 
    float:left;
}
</style>

最佳答案

删除 <style></style>从你的样式表和你的 jsfiddle 作品。实际上,只有 html 页面内的 css 指令才需要它们。

关于html - header 未使用 CSS 更改样式,但其他 div 是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34993929/

相关文章:

python - 在 Raspberry Pi 中使用 OpenCV 和套接字通过 TCP 发送视频

html - 为什么将位置从相对位置更改为绝对位置会改变背景图像的大小?

linux - 用户内核模块 "not found in directory"?

javascript - 树莓派上的 node.js 服务器

单击 iframe 中的链接时 jquery 更改浏览器选项卡标题

jquery - 每个部分的粘性顶部导航加元素

html - 带左、右和居中元素的标题

html - :out-of-range and :invalid?有什么区别

php - 在 cakephp View 中的 html 表行中创建表单

javascript - 将参数传递给 ng-show 中调用的函数