关于 background-color 的 transparent 和 inherit 的问题

Jue_Xin 2008-07-22 10:06:44

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR
/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>About the Local Writers Group</title>

<style type="text/css">
body
{font-family:Verdana, sans-serif;
color:black;
background-color:white;}
h1{color:navy;}
/*link colors*/

.nav a:link{ color:yellow;}

.nav a:visited{color:lime;}

/*link buttoms*/
.nav a:link,.nav a:visited
{ font:bold 12pt Verdana,sans-serif;
padding:0.5em;
margin:0.5em;
display:block;
text-decoration:none;
background: url("picture/button1.gif") transparent 50% 50% no-repeat;}

/*change the button on hover and focus*/
.nav a:hover,.nav a:focus
{ background-image:url("picture/button2.gif");
color:white;}

.nav a:visited:hover,.nav a:visited:hover
{ background-image:url("picture/button3.gif");
color:white;}

</style>
</head>

<body>
<table width="100%" border="0">
<tr><td valign="top" align="center" width="150">
<div class="nav">
<a href="/">Home</a>
<a href="about.html">About Us</a>
<a href="writers.html">Writers</a>
<a href="links.html">Links</a>
<a href="map.html">Map</a>
<a href="calendar.html">Calendar</a>
<a href="cantact.html">Contact</a>
</div>
</td><td valign="top">
<h1>About us</h1>
<p>The Local Writers Group is an informal group of
wtiters who meet <a href="calendar.html">every other
Wednesday evening</a> from 7:30 to 9:00,at the
bookstore near the mall.</p>
<p>If you'd like to attend,just stop by for the next
meeting, or <a href="contact.html">drop a note viae
mail</a> to one of our members.</p>
</td>
</tr>
</table>

</body>
</html>

...全文
2800 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jue_Xin 2008-07-23
  • 打赏
  • 举报
回复
效果图:

我把代码中的22行的transparent改成inherit之后,按钮图就没有了.
改后效果图:


请大家看一下..

按钮图:
button1.gif:


button2.gir:


button3.gif:



Jue_Xin 2008-07-23
  • 打赏
  • 举报
回复
我把代码中的22行的transparent改成inherit之后,按钮图就没有了.
改后效果图:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=8f4cc18b4f094e30e917f985b6d559dce900815a8b19cdeba60e7da8fdbafb68d4431c67d8f947e3b0ba9aad461754b79371f6bc7094932807e831f7c74127dee042a27051c1d88f71ef1413612ad32e80f021f1
请大家看一下..
按钮图:
button1.gif:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=bf21138417eee8a9ba3174ef9e48361800a276ea259203e1b267db15d9376e0f6cc39c180019e1978a8605f0e02ac89d264d17ce72d3b27011020089ba73
75ab9363d4f080de8e2888ce5758c7f1adacfac4cbb6

button2.gir:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=8b8e5b149b5597916bc5683805d8263804543f909350b2ca82f4554af42208911b99f0c27219869cd1b2432eeb784c3ba2499a20c0cb979aba27b4f344e8718b986a4e82d9917895c035c9f6ec384ec82179bf64

button3.gif:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=b8a23aae45f238283dcd8be49aa33064fef2b56b1813005c90285b7d71339144a125f018b460cae89fae0275e4c7d69bd31b7979550178819dac0bb59c6290771155cb2ceb1ef2aaa392eab2a1432641b9fd6dee
Jue_Xin 2008-07-23
  • 打赏
  • 举报
回复
效果图:
<img src="http://photo.store.qq.com/http_imgload.cgi?/rurl2=a895ab27dc054548f5f1ce810d9f6a1ab1922703c861cd313eaeaa7fed16c07d6f8f44d233cd72a03a7a2e736b79880553cebb5456a617bbb057187d8c55c368bb35cb899d8f0b2de4067072c11d69cc1619620c"/>
Jue_Xin 2008-07-23
  • 打赏
  • 举报
回复
你上那个网络空间看一下两个效果图..
我想弄明白的是什么时候应该用transparent.&什么时候用inherit?
icecell 2008-07-23
  • 打赏
  • 举报
回复
transparent是透明,inherit是继承,肯定不一样
xiaojing7 2008-07-23
  • 打赏
  • 举报
回复
楼主是什么意思啊?》
ZMAK_Chun 2008-07-23
  • 打赏
  • 举报
回复
上面的图像连接不到...
请大家先登陆
网络硬盘网址:http://www.ibmdisk.cn/index.aspx
用户名:luckyoo1
密码:123456
(里面有五个文件)

图连接地址:
效果图: http://www.ibmdisk.cn/ContentPane.aspx?down=ok&filepath=luckyoo1%2ffirst.JPG
改后效果图: http://www.ibmdisk.cn/ContentPane.aspx?down=ok&filepath=luckyoo1%2fsecond.JPG
按钮图:
button1.gif: http://www.ibmdisk.cn/ContentPane.aspx?down=ok&filepath=luckyoo1%2fbutton1.gif
button2.gif: http://www.ibmdisk.cn/ContentPane.aspx?down=ok&filepath=luckyoo1%2fbutton2.gif
button3.gif: http://www.ibmdisk.cn/ContentPane.aspx?down=ok&filepath=luckyoo1%2fbutton3.gif
ZMAK_Chun 2008-07-22
  • 打赏
  • 举报
回复
请大家把连接地址的每一行空格去掉,,谢谢了
Jue_Xin 2008-07-22
  • 打赏
  • 举报
回复
按钮图:
button1.gif:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=bf211384
17eee8a9ba3174ef9e48361800a276ea259203e1b267db15d9376e0f6c
c39c180019e1978a8605f0e02ac89d264d17ce72d3b27011020089ba73
75ab9363d4f080de8e2888ce5758c7f1adacfac4cbb6

button2.gir:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=8b8e5b149
b5597916bc5683805d8263804543f909350b2ca82f4554af42208911b99
f0c27219869cd1b2432eeb784c3ba2499a20c0cb979aba27b4f344e8718
b986a4e82d9917895c035c9f6ec384ec82179bf64

button3.gif:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=b8a23aae45
f238283dcd8be49aa33064fef2b56b1813005c90285b7d71339144a125f0
18b460cae89fae0275e4c7d69bd31b7979550178819dac0bb59c62907711
55cb2ceb1ef2aaa392eab2a1432641b9fd6dee
Jue_Xin 2008-07-22
  • 打赏
  • 举报
回复
我把代码中的22行的transparent改成inherit之后,按钮图就没有了.
改后效果图:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=8f4cc18b4f094e30
e917f985b6d559dce900815a8b19cdeba60e7da8fdbafb68d4431c67d8f947e3b0b
a9aad461754b79371f6bc7094932807e831f7c74127dee042a27051c1d88f71ef14
13612ad32e80f021f1
请大家看一下..


Jue_Xin 2008-07-22
  • 打赏
  • 举报
回复
效果图:
http://photo.store.qq.com/http_imgload.cgi?/rurl2=a895ab27dc0
54548f5f1ce810d9f6a1ab1922703c861cd313eaeaa7fed16c07d6f8f44d23
3cd72a03a7a2e736b79880553cebb5456a617bbb057187d8c55c368bb35cb8
99d8f0b2de4067072c11d69cc1619620c

61,125

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧