内容摘抄自 《Web Design for Developers》by Brian Hogan
①
<h2 id="search_header">Search Recipes<span></span></h2>
在heading上加链接
<h2><a id="search_header" href="">Search Recipes<span></span></a></h2>
②
#search_header{
margin: 18px 0;
padding:0;
width:180px;
height:36px;
overflow:hidden;position:relative;/*关键*/
}
③
#search_header span{
display:block;
position:absolute; left:0; top:0; z-index:1;/*关键*/
margin:0;
padding:0;
background: url('....') top left no-repeat;
}

本文介绍了如何使用HTML为heading元素添加链接,并通过CSS实现特定样式布局,包括定位与背景设置。
1131

被折叠的 条评论
为什么被折叠?



