HTML
style=“color: brown; font-family: 正体; font-size: xx-large; font-weight: bolder;”
href属性
hyper reference超引用:通常表示跳转地址
- 普通链接
<a href="链接地址">章节</a>
- 锚链接
- 锚链接
[属性]写法。
<!-- 单个锚链接 -->
<a href="#锚链接">章节</a>
<!-- 多个锚链接(不换行) -->
a[href="#锚链接$"]*n>{章节$}
<!-- 多个锚链接(换行) -->
a[style="display:block;"][href="#锚链接$"]*n>{章节$}
<!-- 回到顶部(写在底部/键盘home键) -->
<a href="#">章节</a>
- 正文
((h2[id="锚链接$"]>{章节$})+p>lorem100)*n
((h2#mao$>{zhang$})+p>lorem10)*5
<h2 id="锚链接">章节</h2>
<p>lorem1000</p>
- 功能链接
点击后触发某个功能
- 执行js代码,JavaScript:
<a href ="javascript:alert('大虞海棠,顶峰相见!')"style="color:brown;">2799</a>
- 发送邮件,mailto:(要求用户计算机上安装有邮件发送邮件)
<a href="mailto:2799@qq.com"style="font-weight:bolder; color:blue;font-size:xx-large">点击给大虞海棠发送邮件</a>
- 拨号,tel:(要求用户计算机上安装有拨号软件,或使用移动端访问页面)
<a href="tel:2799">给鱼塘批拨打电话</a>
target属性
target:表示跳转窗口
target的取值:
- _self: 在当前页面窗口打开,默认值
- _blank: 在新窗口中打开
<a href="http://acm.scau.edu.cn:8000/uoj/mainMenu.html" target="_blank" title="acm.scau">OJ实验系统</a>