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

5、css学习5(链接、列表)

1、css可以设置链接的四种状态样式。

  • a:link - 正常,未访问过的链接
  • a:visited - 用户已访问过的链接
  • a:hover - 当用户鼠标放在链接上时
  • a:active - 链接被点击的那一刻

2、 a:hover 必须在 a:link 和 a:visited 之后, a:active 必须在 a:hover 之后,需要严格按顺序才能看到效果。

3、text-decoration 属性主要用于删除链接中的下划线。

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>CSS学习之链接</title><style>a:link {color: #000000;text-decoration: none;background-color: #B2FF99;}a:visited {color: #00FF00;text-decoration: none;background-color: #FFFF85;}a:hover{color: #FF00FF;text-decoration: underline;background-color: #FF704D;}a:active{color: #0000FF;text-decoration: underline;background-color: #FF704D;}</style></head><body><p><b><a href="/css/" target="_blank">这是一个链接</a></b></p><p><b>注意:</b> a:hover 必须在 a:link 和 a:visited 之后,需要严格按顺序才能看到效果。</p><p><b>注意:</b>a:active 必须在 a:hover 之后。</p></body>
</html>

运行结果:

 

<!DOCTYPE html>
<html><head><meta charset="uft-8"><title>有序、无序列表</title><style>/*根据类名定义样式*/ul.a {list-style-type: circle;}ul.b{list-style-type: square;}ol.c{list-style-type: upper-roman;}ol.d{list-style-type: lower-alpha;}ul.cut{list-style-type: none;margin: 0;padding: 0;}</style></head><body><p>无序列表实例:</p><ul class="a"><li>PHP</li><li>JAVA</li><li>PYTHON</li></ul><ul class="b"><li>PHP</li><li>JAVA</li><li>python</li></ul><p>有序列表实例:</p><ol class="c"><li>PHP</li><li>JAVA</li><li>python</li></ol><ol class="d"><li>PHP</li><li>JAVA</li><li>python</li></ol><p>移除列表默认前标:</p><ul class="cut"><li>PHP</li><li>JAVA</li><li>python</li></ul></body>
</html>            

运行结果:

 

http://www.lryc.cn/news/133624.html

相关文章:

  • Synchronized与Java线程的关系
  • 使用本地电脑搭建可以远程访问的SFTP服务器
  • 批量修改文件名怎么操作?
  • 【LeetCode】538.把二叉搜索树转换为累加树
  • linux 安装 kibana
  • STM32入门——IIC通讯
  • DTC 19服务学习2
  • 【腾讯云 TDSQL-C Serverless 产品体验】基于腾讯云轻量服务器以及 TDSQL-C 搭建 LNMP WordPress 博客系统
  • 【vue3】对axios进行封装,方便更改路由并且可以改成局域网ip访问(附代码)
  • Java IO流(三)线程模型
  • string(模拟实现与深拷贝)
  • 5.Vue_Element
  • 链路追踪jaeger
  • 神经网络基础-神经网络补充概念-42-梯度检验
  • <kernel>kernel 6.4 USB-之-hub_port_connect()分析
  • linux驱动学习3-外部中断
  • vue中的canvas插件
  • 分享图片 | 快速浏览网页资源,批量保存、一键分享图片
  • Programming abstractions in C阅读笔记:p123-p126
  • 自然语言处理从入门到应用——LangChain:链(Chains)-[通用功能:LLMChain、RouterChain和SequentialChain]
  • ElasticSearch-安装部署全过程
  • mathematica报错:Tag Plus is \ Protected
  • Python Django 模型概述与应用
  • Golang Gorm 更新字段 save update updates
  • springBoot 配置文件引入 redis 的相关参数说明
  • Docker的使用心得:简化开发与部署的利器
  • vue3 基于element plus对el-pagination进行二次封装
  • RuntimeError: result type Float can‘t be cast to the desired output type __int64报错解决方法
  • 解析Python爬虫常见异常及处理方法
  • 详解Spring的循环依赖问题、三级缓存解决方案源码分析