我有一个问题:我有简单的HTML代码和CSS代码,但CSS不起作用...请问,当我出错时,你能告诉我吗?:
<html>
<head>
<link rel="icon" type="image/ico" href="http://eslgfx.net/nodelogo/lol_small.ico"/>
<title> LOL (fake :D) </title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body link="#CDA221" vlink="lime" alink="#CDA221">
<body background=http://i.imgur.com/0TugbQI.png">
<h1> My page </h1>
<form name="form" method="post" action="file:///C:/Documents%20and%20Settings/Filip/Desktop/formular.html">
<br> Please, enter your personal data:<br>
Name: <input type="text" name="meno" maxlength="20"><br>
Password: <input type="password" name="password" maxlength="20"><br>
<input type="submit" name="Send" value="Odoslať">
<style type="css">
input[type="submit"] {
background: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwwHBw0HBw0IBwcHBwwHBwcHDQ8IDAcMFBEWFhQRFBMYHCggGBo9GxQULTEhMSkrRjpCFx86OEosOSgtLisBCgoKDQwMDgwMFCwZFBkrLDIuKzErKywrLSsrLDIrKywxKzc3LSsrKysrLisrKysvKywwKy4rKysrLSsyKy8uLP/AABEIALEBHAMBIgACEQEDEQH/xAAaAAADAQEBAQAAAAAAAAAAAAACAwQAAQUG/8QAGxABAQEBAQEBAQAAAAAAAAAAAAECAxIREyH/xAAaAQEBAAMBAQAAAAAAAAAAAAAAAQIDBAYF/8QAGREBAQEAAwAAAAAAAAAAAAAAABESASEx/9oADAMBAAIRAxEAPwD6CR2R2QUjyD6jkjvx2QUgB+N8H8d+IF/G+GfG+AX5cuTfjnkCbkNyfchuVCLkNyfcguQIuQXKi5BcqJ7ku5UXILlRPYCw/WQWKhFgLD7C7AJsDYbYCxQqwNhtgLFC7HB2BsBxmYGZmBmZgd+T59+/3+/xxmXnnzofWwUcg40q0gpGgoiufHfjsdkBz43wfxvgA+N8M+N8Ary5cm/HLkCbkNyfchuQT3ILlRcguVRNcg1lTcg1lRLcl6yq1kvWQTXJdyp1kvWVE9hdii5BcqhFgLDr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n56GTqQq+dBTohnQc6JCrZ0FOiKdBTokKs/RvaT9Hf0IKvbntP7b2QUew3ZHtz2Qp90G6J9uXZA26DdFXbl0sDLoF0C6BdEB2gtDdB9LB8h9b6V6b06YwN+t9K9N6IHenZsj076IKJsU2mmhTaQqqbFNpZsU2QqubHNo5sc2kKtnQc6Ipsc2kWrZ0MnRDOg50MlXToZOiCdBzomRfOg50QToOdEyLp0HOiGdBToQWzoKdEU6CnRILP0b9En6O/oQVe29pf0b9CCn25dpv0b2QPu3Lsj2H2QPuw3ZN2G7WB1257Juw+yD5T03or03p0xgb6b0V6b0QN9N6K9N6IHenZoj076IU+aFNp/Ts0kKpmxTaaaFNkKqmxTaSbHNpFqubHNo5sc2QWToOdEU2OdEgsnQc6Ip0HOhCrZ0FOiKdBTomSrZ0FOiKdBTokFn6O/oj/R39DJVf6O/ok/Rv0IVX+jn6Jf0b9DJVP6Oe0/6OeyCj25dp/bl2QUXYfZHtz2sHzXpvRXpvTojE303or03ogb6b0V6b0QN9N6K9N6IHenZoj076IHzTs2R6dmkgomxTaaaFNEFM2KbTTbs2QVTYptLNim0grmxTaSbFNkFc2KdEk27NpCrJt2dEk2KdCFVzo7+iSbd/QyVX+jfol9t7TJVX6O/ol9t7MlU+29pvbeyFUe3Paf23shVHtz2n9ue1g8RmZtYszMDMzAzMwMzMDrsZgdjsZkUUdjMAoJmB2CZkBCjMDrsZkHYKMwNHWYHWZgZmYHGZgccZgf/Z);
width: 200px;
height: 50px;
border: 0;
}
<style>
</form>
</body>
</html>
输出结果是: 我想改变&#34;提交&#34;按钮外观。请帮忙。
答案 0 :(得分:3)
您可以使用:
<style type="text/css">
而不是:
<style type="css">
此外,您只需要一个<body>
代码,而"
值的background
版本<body background="http://i.imgur.com/0TugbQI.png"link="#CDA221" vlink="lime" alink="#CDA221">
<!-- ------------^ Missing " here -->
将丢失:
<style>
以及使用</style>
答案 1 :(得分:1)
<style type="css">
在浏览器中不一致!!
这样做
<style media="screen" type="text/css">
/* css styles*/
</style>
或简单地说:
<style>
/* css styles*/
</style>
您还没有关闭<style>
标签! :)
答案 2 :(得分:0)
将两个标签合并为一个
<body link="#CDA221" vlink="lime" alink="#CDA221" background=http://i.imgur.com/0TugbQI.png">
使用"text/css"
代替"css"
将<style>
标记放入<head>
标记。