我想在这张背景图片上添加一个超链接。我应该在样式表中创建一个新的类吗?(当我尝试调用新类时,图片消失了)。
body{
background-image:url('http://thehypebr.com/wp-content/uploads/2010/09/boundless-sem-branco-2.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
line-height:20px; font-size:14px;
font-family:"Trebuchet MS";
margin:0
}
编辑:现在顶部和底部有空白(是新div类创建的吗?)
"onclick="window.location.href="http://boundlessny.com/clothing""
,而应该使用"onclick='window.location.href="http://boundlessny.com/clothing'"
,即将单引号嵌套在双引号内。 - Skilldrick