开发者

internal css will not work

开发者 https://www.devze.com 2023-04-07 09:21 出处:网络
My internal css won\'t work with the little code I have. This seems like a really stupid question but nothing I do helps.

My internal css won't work with the little code I have. This seems like a really stupid question but nothing I do helps.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>Ask Help</title>
<style type = "text/css">
@font-face {
font-family: "junction";
src: url("Junction_02.otf");
}

html {
background-image: linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -o-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -webkit-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219)       54%);
background-image: -ms-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.02,   rgb(75,135,163)), color-stop(0.54, rgb(127,219,219))
}

.menu {
list-style-type: none;
font-size: 25px;
}

h1 {
font-family: junction;
text-size: 60px;
}
</style>
</head>
<body>
    <nav>
        <ul class="menu">
            <li><a href="index.html" title="Home">Home</a></li>
            <li><a href="about.html" title="About Us">About</a></li>
            <li><a href="past.h开发者_Go百科tml" title="iPod">Past Q&amp;A's</a></li>
        </ul>
    </nav>
</body>
</html>


This line is missing a close parenthesis ) which is affecting your markup:

background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.02,   rgb(75,135,163)), color-stop(0.54, rgb(127,219,219))

Change it to this:

background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.02,   rgb(75,135,163)), color-stop(0.54, rgb(127,219,219)));

You should look into using W3C's HTML and CSS validation tools to catch problems like these. The HTML validator isn't great about catching bad CSS, so you can copy-paste your embedded CSS into the CSS validator.

Oh and might as well put a semi-colon at the end of that last background-image statement (I did it for you), since it'll save you grief if you add more lines in the future but forget to add the semi-colon to the previous line.

0

精彩评论

暂无评论...
验证码 换一张
取 消