HTML 样式 & 链接
2015-07-27 16:34
573 查看
HTML样式
外部样式表
<head>
<link rel="stylesheet" type="text/css" href="~/Content/StyleSheet1.css">
</head>
内部样式表
<head>
<style type="text/css">
body {background-color : yellowgreen}
h1 {color:red}
p {color:blue}
</style>
</head>
内联样式
<b style="color:greenyellow"> Bold </b> <br/> <!--粗体-->
没有下划线的链接
<a href="http://www.google.com" style="text-decoration:none">Google</a> <br/>
*Note: <style>定义样式定义 <link>定义资源引用
HTML链接
创建超级链接
<a href="https://www.baidu.com" target="_blank">BaiDu</a> <br/>
<a href="http://www.google.com" style="text-decoration:none">Google</a> <br/>
将图像作为链接
<a href="http://www.hao123.com"> <img border="0" src="~/Content/Media.png"/> </a> <br/>
target属性
<a href="https://www.baidu.com" target="_blank">BaiDu</a> <br/>
name属性
<a name="tips">锚</a> <br/>
.......
<!--锚-->
<a href="#tips">Jump to 锚</a> <br/>
链接到本地资源
<!--本地资源-->
<a href="~/Content/Site.css">Site.css</a> <br/>
创建电子邮件
<!--邮件-->
<a href="mailto:v-victw@microsoft.com?subject=Hello%20again">Send email to Victor</a> <br/>
<!--邮件及抄送-->
<a href="mailto:v-victw@microsoft.com?cc=v-amal@microsoft.com&bcc=v-gaw@microsoft.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party">Party</a>
外部样式表
<head>
<link rel="stylesheet" type="text/css" href="~/Content/StyleSheet1.css">
</head>
内部样式表
<head>
<style type="text/css">
body {background-color : yellowgreen}
h1 {color:red}
p {color:blue}
</style>
</head>
内联样式
<b style="color:greenyellow"> Bold </b> <br/> <!--粗体-->
没有下划线的链接
<a href="http://www.google.com" style="text-decoration:none">Google</a> <br/>
*Note: <style>定义样式定义 <link>定义资源引用
HTML链接
创建超级链接
<a href="https://www.baidu.com" target="_blank">BaiDu</a> <br/>
<a href="http://www.google.com" style="text-decoration:none">Google</a> <br/>
将图像作为链接
<a href="http://www.hao123.com"> <img border="0" src="~/Content/Media.png"/> </a> <br/>
target属性
<a href="https://www.baidu.com" target="_blank">BaiDu</a> <br/>
name属性
<a name="tips">锚</a> <br/>
.......
<!--锚-->
<a href="#tips">Jump to 锚</a> <br/>
链接到本地资源
<!--本地资源-->
<a href="~/Content/Site.css">Site.css</a> <br/>
创建电子邮件
<!--邮件-->
<a href="mailto:v-victw@microsoft.com?subject=Hello%20again">Send email to Victor</a> <br/>
<!--邮件及抄送-->
<a href="mailto:v-victw@microsoft.com?cc=v-amal@microsoft.com&bcc=v-gaw@microsoft.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party">Party</a>
相关文章推荐
- 判断浏览器是否支持CSS3 已经初步探索JS 惰性加载
- jsp引用js和css路径问题
- CSS3 timing-function: steps()
- 【CSS3】transform-origin以原点进行旋转 (转)
- CSS3阴影 box-shadow的使用和技巧总结
- Word中如何设置表格的边框线样式和颜色
- css spprite应用
- CSS制作响应式正方形及其应用
- 常用的css hack介绍
- 字体文件以base64编码的方式引入内嵌到样式文件中
- 形形色色的下拉菜单 (css3)
- css content 如何自定义生成图标?
- CSS居中小结
- html+css
- CSS清除浮动常用方法
- 解决子级用css float浮动 而父级div没高度不能自适应高度 - DIVCSS
- CSS基础知识
- 多余字以省略号显示的css样式
- 精通CSS+DIV简单小结(二)
- 按钮样式