CSS正文背景颜色不起作用?

6 html css

我假设这是一个非常简单的问题,但我茫然地盯着我的屏幕试图解决这个问题.我正在尝试更改我的html文档正文中的一些内容,但没有任何变化?

@charset "utf-8";
body
{
    background-color: aqua;
}
Run Code Online (Sandbox Code Playgroud)
<!DOCTYPE html>
<html>
<head>
    <title>Statistics</title>
    <link rel="stylesheet" type="text/css" href="main.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
 integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
    <button type="button" class="btn btn-lg btn-default-outline">View All</button>  
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

如果我更改背景图像,它工作正常.知道为什么吗?它可能是bootstrap css吗?

小智 9

如果你在"aqua"之后添加!important,它有用吗?

@charset "utf-8";
body
{
    background-color: aqua !important;
}
Run Code Online (Sandbox Code Playgroud)

如果是,那么可能还有其他一些样式,比如bootstrap.css干扰.

您还应该在bootstrap-css 之后放置自定义css文件.