[英]CSS3 not working on HTML
I'm building my first website using bootstrap and the CSS is not working on any of the html. 我正在使用Bootstrap建立我的第一个网站,而CSS在任何html上均不起作用。 What am I doing wrong here?
我在这里做错了什么? I am very new to web design and bootstrap and understand I have to link the HTML to the Bootstrap server to be able to use the feature, but am I doing it right here?
我是Web设计和引导程序的新手,并且了解必须将HTML链接到Bootstrap服务器才能使用该功能,但是我是否正在此处进行操作?
How long does it take to learn Bootstrap and is there a better way to go instead of constantly writing div
s all day long? 学习Bootstrap需要花多长时间?有没有比整天不停地写
div
更好的方法了?
HTML code: HTML代码:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ignite Studio Portfolio</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> </script>
<link rel="stylesheet" type="text/css" href="portfolio.css">
</head>
<body>
<div class="row">
<div class="col-12">
<nav class="navbar navbar-default fixed-nav-bar" id="nav">
<div class="container-fluid">
<ul class="nav navbar-nav">
<li class="active">
<a href="#">Ignite Studio Portfolio</a>
<a href="#" >Home</a>
<a href="#">Web</a>
<a href="#">Programming</a>
<a href="#">Art</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</body>
</html>
CSS3 code: CSS3代码:
body {
padding-top: 30px;
background-color: blue;
};
.container-fluid {
background-color: pink;
};
.fixed-nav-bar {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 50px;
background-color: black;
};
#navhead {
font-color: orange;
};
just remove semi-colon after closing flower bracket in css. 只需在CSS中关闭花括号后删除分号即可。 it should work!
它应该工作!
if you don't want to write code than use bootstrap builder tool.. A powerful desktop app for creating responsive websites using the Bootstrap framework.
如果您不想编写代码,请使用引导程序生成器工具。.一个强大的桌面应用程序,用于使用Bootstrap框架创建响应式网站。
https://bootstrapstudio.io/
The text color property is called color
, not font-color
(last rule) 文本颜色属性称为
color
,而不是font-color
(最后一个规则)
Also, remove all the semicolons after the closing brackets of the CSS rules, and check the filepath to your CSS file. 另外,删除CSS规则右括号后的所有分号,并检查CSS文件的文件路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.