用户登录
用户注册

分享至

使用 CSS 将链接文本替换成图片

  • 作者: 白云小布
  • 来源: 51数据库
  • 2022-08-15
<h1><a href="./" title="Return Home"><span></span>Home</a></h1>

#header h1 a{
	display:block; /* Required */
	width:250px; /* Width of image in question */
	height:70px; /* Height of image in question */
	position:relative; /* Required */
}
#header h1 a span{
	position:absolute; /* Required */
	width:100%; /* Stretch full width of parent */
	height:100%; /* Stretch full height of parent */
	background:url(images/logo.gif) top left no-repeat; /* Image */
	cursor:pointer; /* Required for links to appear like links in IE */
}
软件
前端设计
程序设计
Java相关