喵宅苑 MewoGarden × 技术宅社区II | Z站 Z Station 棒棒哒纯文字二次元技术社区

正文

点击图片

作者:月夜猫妖
part11: 来源: http://www.codecademy.com/zh/cou ... fb998b470000202dc8b Click that image 点击图片 Good work! Now you know how to add images to your website. But what if you want to click on that image to lead you somewhere else? 干得好,现在你已经知晓如何把图片添加到你的网站。但是如果你想通过点击这张图片把你带到其他地方该怎么做? The <a> tag is the one used to make hyperlinks (or just links) on webpages. These are the words or images you click to go to a new page! “<a>”标签是一个用于给网页添加超文本链接(或者只是链接)的标签。(通过使用这个标签,)你能通过点击那些图片或文本去新的页面。 Just like <img>, <a> has an attribute that tells the link where to go. Instead of src, <a> uses href, like so: 就像“<img>”标签一样,“<a>”标签通过一个属性来告知链接到何处。它使用“href”来替代(“<img>”中的)“src”。就像下面那样: <a href="http://www.codecademy.com">Learn to code!</a> src stands for "source." It tells the <img> link where the picture comes from! “src”意思是“来源”,这告诉“<img>”标签图片在何处。 href stands for "hypertext reference." Remember when we said that hypertext (that is, links) is text you can click on? Well, href tells that link where to go! The text after href is the web address, and the text between <a> and </a> is the text you click on. “href”意思是“超文本链接”牢记我们所说的超文本(就是链接)是否就是一段你能点击的文本?好的,“href”告诉链接到何处,在“href”后的文本是网址,就是你在“<a>”标签间所能点击的那段文本被点击时链接的地址。 Instructions 操作指南 Here's how to turn an image into a link: put a <a href="URL"> tag before your <img> tag and a </a> tag after them. In the quotes after href=, put in your favorite website address! 这是如何把图片变为链接的方法:添加“<a href="URL">”在“<img>”标签前并在之后填上“</a>”,在“href=”后填入你最爱网站的地址。

回复

0%
站点地图友情链接:
喵宅苑
喵空间社区程序
喵宅苑 静态版
宅喵RPG地图编辑器
络合兔
Lanzainc
技术宅
小五四博客
莉可POI
Mithril.js
枫の主题社
Project1
午后少年
机智库
七濑胡桃
xiuno
幻想の日常
魂研社
Nothentai
0xffff
欲望之花
泽泽社长
淀粉月刊
HAYOU