尝试设置伪 .css 的 css 属性时,我在 Chrome 和资源管理器中收到以下错误:after。(我正在尝试设置一个汉堡导航图标并为其设置样式)
我收到错误:
'未知的属性名称'
当我设置width,height,background等伪:after。这是在 Chrome 中:
给我错误的代码:
nav a#pull:after {
content:"";
background: url('nav-icon.png') no-repeat;
width: 30px;
height: 30px;
display: inline-block;
position: absolute;
right: 15px;
top: 10px;
Run Code Online (Sandbox Code Playgroud)
完整的 HTML 代码
<html>
<head>
<title>Delivery Motion!</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-3.0.0.min.js"></script>
<script>
window.onload = function() {
if (window.jQuery) {
// jQuery is loaded
alert("Yeah!");
} else {
// jQuery is …Run Code Online (Sandbox Code Playgroud)