当前位置: 首页 > news >正文

男的做直播网站好手游推广加盟

男的做直播网站好,手游推广加盟,成都著名网站建设公司,web服务器做网站一、属性选择器与伪类选择器 属性选择器&#xff1a;匹配那些具有特定属性或属性值的元素 <style>/* */input[type"password"] {background-color: aqua;}/* 具有某个属性的指定标签 */div[title] {background-color: pink;}/* 属性的值中包含某个值 */inpu…

一、属性选择器与伪类选择器

属性选择器:匹配那些具有特定属性或属性值的元素

<style>/*  */input[type="password"] {background-color: aqua;}/* 具有某个属性的指定标签 */div[title] {background-color: pink;}/* 属性的值中包含某个值 */input[type*="e"] {background-color: blueviolet;}/* 属性值以什么开头 */input[type^="p"] {background-color: brown;}/* 属性值以什么结尾 */input[type$="t"] {background-color: red;}/* +表示的是下一个标签 */.box1+p {background-color: blue;}</style>

伪类选择器:添加到选择器的关键字,用于指定所选元素的特殊状态。

<style>/* 访问前 */a:link {color: red;}/* 访问后 */a:visited {color: chartreuse;}/* 鼠标悬停时 */a:hover {color: pink;}/* 鼠标点击时 */a:active {color: darkblue;}/* 需要按照lvha的顺序书写 */</style>

其他伪类:

    <style>ul li:nth-child(8) {background-color: pink;}li:nth-child(2n+1) {background-color: blue;}li:last-child {background-color: aqua;}ul li:first-child {background-color: aquamarine;}li:nth-of-type(3) {background-color: aqua;}</style>
</head><body><ul><li>我是一个li1</li><li>我是一个li2</li><p>我是一段文字</p><li>我是一个li3</li><li>我是一个li4</li><li>我是一个li5</li><li>我是一个li6</li><li>我是一个li7</li><li>我是一个li8</li><li>我是一个li9</li><li>我是一个li10</li><li>我是一个li11</li><p>我是一个段落</p></ul></body>

伪元素选择器:伪元素是一个附加至选择器末的关键词,允许你对被选择元素的特定部分修改样式。

<style>ul li::before {content: "66666";width: 10px;height: 10px;background-color: pink;}ul li::after {content: "----------------zhangsan";}/* 文字被选中时 */ul li::selection {background-color: pink;}</style>

二、文本修饰:

font:

 font-size: 12px;/*  */font-weight: 700;text-align: center;font-style: italic;/* 字体族 */font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;/* 让行高等于容器的高度,来实现单行文本的垂直居中  */line-height: 300px;/* 默认400是正常粗细,700是加粗字体   bold*//* font-weight: 400;    normal*/font-weight: bold;/* line-height: 40px; *//* font:style weight size/line-height family; */font: italic 700 30px/40px "微雅软黑";

文本缩进:text-indent: 2em;

文本装饰:

    /* 主要用于去除a链接的默认样式 */

            text-decoration: none;

颜色:

            /* background-color: aqua; *//* 关键字 */color: rgb(131, 13, 33);/* rgb函数(红、绿、蓝)三原色 *//* rgba函数(红、绿、蓝、透明度) */color: rgba(131, 13, 33, 0.3);/* 十六进制表示 */color: #00FFFF;

三、练习:五彩导航

本次选择用伪类选择器方法进行试验,则鼠标悬在上方时变色

html:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>五彩导航</title><link rel="stylesheet" href="css1.css">
</head><body><div class="five"><a href="#" class="five1">五彩导航</a><a href="#" class="five2">五彩导航</a><a href="#" class="five3">五彩导航</a><a href="#" class="five4">五彩导航</a></div></body></html>

css:

.five a {display:inline-block;width: 120px;height: 58px;background-color:pink;text-align: center;line-height: 50px;color:aqua;
}
.five .five1:hover {background-color: yellow;
}
.five .five2:hover {background-color: purple;
}
.five .five3:hover {background-color:red;
}
.five .five4:hover {background-color: blue;
}

http://www.wangmingla.cn/news/110847.html

相关文章:

  • wordpress站点是什么意思如何查询百度搜索关键词排名
  • 做网站去哪找公众号关键词排名优化
  • asp.net 网站图标信息流优化师简历模板
  • 网站建设前期需要准备什么资料市场调研分析报告范文
  • 前端培训机构出来的好找工作吗外贸seo软文发布平台
  • 天河建设网站平台今日热点新闻头条国内
  • 龙岗中心城网站建设新手怎么入行seo
  • 库尔勒市建设路街道办网站百度收录查询工具官网
  • 深圳平台型网站建设公司aso优化的主要内容为
  • 武汉简单做网站南宁网络推广培训机构
  • 数据库网站建设免费推广工具有哪些
  • 谁有手机网站微信广告投放推广平台多少费用
  • 厦门网站建设方案服务app推广一手单平台
  • 邯郸网站建设百度指数有三个功能模块
  • 提升网站长尾关键词排重庆网页优化seo
  • wordpress添加喜欢or分享按钮临沂seo公司
  • 做网站 花时间网络舆情监测系统软件
  • 网站域名用公司注册信息查询it培训班出来现状
  • 网站倒计时怎么做的网络营销策划书范文
  • wordpress 模板 门户正规的关键词优化软件
  • 门户网站做啥百度网页pc版登录
  • 网站制作案例市场网络营销seo优化
  • 网站后台管理系统 静态页面百度的网址是什么呢
  • 河间网站免费建站模板
  • 优化科技厦门网站推广优化哪家好
  • 把一个网站挂到网上要怎么做百度app下载链接
  • 网站建设战略伙伴核心关键词和长尾关键词
  • wordpress关闭评论功能深圳百度推广排名优化
  • 江苏省建设工程网站系统郴州seo快速排名
  • 到哪里做网站合肥seo管理