如何使图像的某个部分可以点击?

时间:2014-08-06 00:29:29

标签: html css

我是编码的新手,我有一个问题,我需要让我的toheader,或者更确切地说,我的顶部导航栏,让某人点击其中的内容。使用html文本是有意义的,但我遇到了Dreamweaver的问题,不让我把文字放在我的背景图像上方,你会看到它就在我的顶部导航栏下方。所以,相反,我将顶部导航栏设为图像,我需要" facebook"导航栏上的图标可点击。有人说使用区域标签,但对于像我这样年轻的人来说似乎太混乱了。

Jsfiddle [包含css] http://jsfiddle.net/6LA75/

<body>
<img src="images/page composition/NavBar.png" />

<div id="wrapperstalled"
   <div id="logo">
   <img src="images/logo/logo-vector.png" />
   </div>
</div>


<div id="wrapper">
   <STYLE TYPE="text/css">
   <!--
   P {text-indent: 8pt;}
   -->
   </STYLE>

   <div id="aboutus">   
       <p>We are a Hagerstown-based junk removal and moving service. Able to accomplish jobs both big and small, we accept residential, commerical, and industrial jobs. </p>
       <p>&nbsp;</p>
       <p>Active since 2014, we are a relatively new service looking to help as many people as possible. Visit our Facebook Page to stay posted on our recent works, job openings,        special offers and more. </p>
   </div>

   <div id="scheduling">
     <p>To schedule for a service, please provide the information listed
     below and we will respond promptly.</p>
   </div>

   <div id="contactus">
   <p>If you have any questions, comments, or concerns, our contact information is listed below.</p>
   <p>&nbsp;</p>
   <p>Phone: (443) 690 6421</p>
   <p>Email: service@hagdustboy.com</p>
   </div>   
</div>

</body>

以下是我的浏览器网页视图。 http://www.pixentral.com/show.php?picture=1UA4sXXTUMVf6eLFnJS2E4c75rzKy1

我想让圈出的区域可以点击。

1 个答案:

答案 0 :(得分:0)

根据需要更改 coords href 以及 src 属性。

<div id="logo">
   <img src="http://www.brookhavencollege.edu/images/bhc/icons/facebook.png" usemap="#logolink" />
 <map name="logolink">
   <area shape="rect" coords="200,10,30,30" href="#">
   <area shape="rect" coords="250,10,300,50" href="#">
 </map>
</div>