转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76618373

觉得博文有用,请点赞,请评论,请关注,谢谢!~

伪类:

<!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" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>伪类</title>
    <style type="text/css">
        /*伪类*/
        a:link{color: red;}/*在点击超连接之前所有表现的样式*/
        a:visited{color: #999999;}/*浏览过后的超链接样式*/
        a:hover{color: green;text-decoration: none;}/*鼠标悬停在超链接上的样式*/
        a:active{color: blue;font-weight: bold;}/*鼠标点击同时所表现的样式*/
    </style>
</head>
<body>
    <a href="http://blog.csdn.net/iwanghang">点击跳转到我的博客</a>
</body>
</html>

字体属性:

<!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" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>字体属性</title>
    <style type="text/css">
        /*字体属性*/
        h1{font-family:"幼圆","黑体";font-size: 22px;font-style: normal;}
        h2{font-family:"宋体";font-size:0.75cm;font-style: italic;}
        h3{font-size:300%}
        p{font-weight:bold; }
    </style>
</head>
<body>
    <h1>我是第一段文字</h1>
    <h2>我是第二段文字</h2>
    <h3>我是第三段文字</h3>
    <p>我是第四段文字</p>
</body>
</html>

文本样式属性:

<!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" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>文本样式属性</title>
    <style type="text/css">
        /*文本样式属性*/
        h1{text-decoration: underline;text-align: left;text-indent: 2cm;}
        h2{text-decoration: overline;text-align: center;}
        h3{
            text-decoration: line-through;
            text-align: right;
            line-height:30px;
            border: 1px solid red;
            font-size: 20px
        }
    </style>
</head>
<body>
    <h1>我是第一段文字</h1>
    <h2>我是第二段文字</h2>
    <h3>我是第三段文字</h3>
</body>
</html>

背景样式属性:

<!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" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>背景样式属性</title>
    <style type="text/css">
        /*背景样式属性*/
        div{
            background-image: url(https://ss0.baidu.com/73t1bjeh1BF3odCf/it/u=2239989275,1992259040&fm=85);
            background-repeat: no-repeat;    /*repeat-x:水平方向重复;repeat-y:垂直方向重复;no-repeat:仅显示一次;*/
            background-attachment: scroll;    /*fixed:不动;scroll:滚动;*/
            background-position: bottom right;    /*center;bottom;right*/
            height: 800px;
            border: 1px solid blue;
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>

边框样式属性:

<!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" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>边框样式属性</title>
    <style type="text/css">
        /*边框样式属性*/
        div{
            border-color:red;
            border-width: 5px;
            border-style:double;    /*dashed:虚线;double:双实线;*/
        }
        p{border-top:1px solid red;}
        h1{border-left: 5px dashed green;}
    </style>
</head>
<body>
    <div>我是一个div</div>
    <p>我是一个p</p>
    <h1>我是一个h1</h1>
</body>
</html>

转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76618373

欢迎移动开发爱好者交流
沈阳或周边城市公司有意开发Android,请与我联系
联系方式

微信:iwanghang
QQ:413711276
邮箱:iwanghang@qq.com

觉得博文有用,请点赞,请评论,请关注,谢谢!~



Android程序员学WEB前端(7)-CSS(2)-伪类字体文本背景边框-Sublime的更多相关文章

  1. Android程序员学WEB前端(8)-CSS(3)-盒子内联块级定位浮动-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76618473 觉得博文有用,请点赞,请评论,请关注,谢谢!~ 盒子模型: <!D ...

  2. Android程序员学WEB前端(6)-CSS(1)-选择器-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76576469 觉得博文有用,请点赞,请评论,请关注,谢谢!~ CSS外部文档链接: & ...

  3. Android程序员学WEB前端(2)-HTML(2)-锚点链接列表表单-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76522417觉得博文有用,请点赞,请评论,请关注,谢谢!~锚点 链接 列表 表单 &l ...

  4. Android程序员学WEB前端(1)-HTML(1)-标准结构常用标签-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76522043觉得博文有用,请点赞,请评论,请关注,谢谢!~ 8月份了,换工作有2个月了 ...

  5. Android程序员学WEB前端(5)-HTML(5)-框架集-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76576279 觉得博文有用,请点赞,请评论,请关注,谢谢!~ 框架集: index7. ...

  6. Android程序员学WEB前端(4)-HTML(4)-注册页面-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76576031 觉得博文有用,请点赞,请评论,请关注,谢谢!~ 注册页面1: <! ...

  7. Android程序员学WEB前端(3)-HTML(3)-表单嵌套-Sublime

    转载请注明出处:http://blog.csdn.net/iwanghang/article/details/76522586觉得博文有用,请点赞,请评论,请关注,谢谢!~ 表单嵌套: <!DO ...

  8. 【从0到1学Web前端】CSS伪类和伪元素

    1.CSS中的伪类 CSS 伪类用于向某些选择器加入特殊的效果. 语法: selector : pseudo-class {property: value} CSS 类也可与伪类搭配使用 select ...

  9. 【从0到1学Web前端】CSS伪类和伪元素 分类: HTML+CSS 2015-06-02 22:29 1065人阅读 评论(0) 收藏

    1.CSS中的伪类 CSS 伪类用于向某些选择器添加特殊的效果. 语法: selector : pseudo-class {property: value} CSS 类也可与伪类搭配使用 select ...

随机推荐

  1. [CF1042F]Leaf Sets

    题意:给定一棵$n$个点的树,将叶子节点分为数个集合使集合里点对最长距离不超过$k$,求最少集合数.($n\le1000000$) 首先我们可以想到,这道题并不是让你构造最优方案,因为只要把所有叶子节 ...

  2. SaltStack应用grains和jinja模板-第四篇

    目标需求 1.使用jinja模板让apache配置监听本地ip地址 2.了解grains的基本使用方法 说明:实验环境是在前面的第二篇和第三篇基础上完成 实现步骤 使用grains获取ip地址信息 使 ...

  3. Spring中RestTemplate进行Http调用

    Spring中的RestTemplate类源自spring-web,http调用中设置超时时间.设置连接池管理等非常重要,保证了系统的可用性,避免了长时间连接不上或者等待数据返回,拖垮系统. 现贴出工 ...

  4. String中的equals方法解析 jdk1.7

    注  此篇为jdk1.7中的源码解析 equals()方法中的判断分一下步骤 1先判断内存地址是否相同  如果内存地址相同 那么字符串就是相同的 返回true 2 判断当前字符串和参数字是否属于同一类 ...

  5. LeetCode——remove-duplicates-from-sorted-list-ii

    Question Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only dist ...

  6. Windows下安装mayavi2

    由于要使用mayavi2画三维图,但是没有找到二进制包,所以只能安装pythonxy或者canopy之类的版本,后来在http://www.lfd.uci.edu/~gohlke/pythonlibs ...

  7. 在服务器 部署 asp.net core 报502.5的错

    HTTP Error 502.5 - Process Failure 如果 IIS 该安装的都装好了的话,那就需要安装一个.net core sdk,链接如下: https://www.microso ...

  8. Spring boot 外部资源配置

    tomcat配置访问图片路径映射到磁盘路径   首先,我在调试页面的时候发现,图片路径为: 1 /webapps/pic_son/img/1234565456.jpg 但是,tomcat中webapp ...

  9. Struts2 入门实例

    一.最简登录 Demo:login.jsp——web.xml——struts.xml——LoginAction.java——struts.xml——index.jsp 1.下载 Struts2 框架: ...

  10. hibernate:inverse、cascade,一对多、多对多详解

    1.到底在哪用cascade="..."? cascade属性并不是多对多关系一定要用的,有了它只是让我们在插入或删除对像时更方便一些,只要在cascade的源头上插入或是删除,所 ...