我正在使用物化框架,並添加了<!DOCTYPE html>
它無法識別我的CSS。但它的工作原理沒有<!DOCTYPE html>
。我應該如何解決這個錯誤?DOCTYPE html messes我的css
更新:
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Material</title>
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css">
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.min.js"></script>
<script>
$(document).ready(function(){
$(".button-collapse").sideNav();
});
</script>
<style>
body{background-color:#fcfcfc;}
.logo{
height:70%;
margin-top:10px;
margin-left:10px;
}
@media only screen and (max-width: 992px){
.logo{
margin-left:0px;
}
}
.button-collapse{
margin-left:5px;
}
</style>
</head>
<body>
<div class="navbar-fixed">
<nav class="blue lighten-1">
<div class="nav-wrapper">
<a href="index.php" class="brand-logo"><img src="images/logo.png" class="logo" /></a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
<li><a href="index.php" class="waves-effect waves-light">Home</a></li>
<li><a href="#" class="waves-effect waves-light">Login</a></li>
<li><a href="#" class="waves-effect waves-light">Signup</a></li>
<li><a href="#" class="waves-effect waves-light">Contact Us</a></li>
</ul>
<ul class="side-nav" id="mobile-demo">
<li><a href="index.php" class="waves-effect waves-light">Home</a></li>
<li><a href="#" class="waves-effect waves-light">Login</a></li>
<li><a href="#" class="waves-effect waves-light">Signup</a></li>
<li><a href="#" class="waves-effect waves-light">Contact Us</a></li>
</ul>
</div>
</nav>
</div>
<div class="row header-img">
</div>
</body>
</html>
它是否打破所有的CSS或只爲一些標籤? – Nurjan
哪裏可以放你的CSS?在外部還是內部? – Fiido93
你能顯示CSS嗎? – simnys