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

前端制作

使用float: left将格子左浮动。

设置格子背景颜色,字体颜色,鼠标放上去后的字体颜色和背景颜色

<style>.title {width: 100%;overflow: hidden;}.title-topic a {     /*以下元素应用于topic*/float: left;     /*左浮动,让12个格子在一行*/width: 8.33%;    /* 每个格子宽度为总宽度的 1/12 */box-sizing: border-box;text-align: center;    /*居中对齐*/background-color:blue;    /*背景颜色*/padding: 20px;display: block;       /*将元素显示为块级元素*/color:blueviolet;    /*文本颜色*/}.title-figure a {    /*以下元素应用于figure*/float: left;width: 8.33%; box-sizing: border-box;text-align: center;background-color: #fe722171;padding: 20px;display: block;color: rgb(15, 12, 13);}.title-figure a:hover{     /*悬停,鼠标移到格子时改变字体和背景颜色*/color: red;background-color:bisque;}.title-topic a:hover{color: red;background-color: aqua;}</style><div class="title"> /*#--#表示该链接的目标URL为当前页面本身,不会跳转到其他页面<div class="title-topic"><a href="#">人物简介</a></div><div class="title-figure"><a href="#">梅西</a></div><div class="title-figure"><a href="#">C罗</a></div><div class="title-figure"><a href="#">姆巴佩</a></div><div class="title-figure"><a href="#">武磊</a></div><div class="title-figure"><a href="#">内马尔</a></div><div class="title-figure"><a href="#">赵忠祥</a></div><div class="title-figure"><a href="#">李光洙</a></div><div class="title-figure"><a href="#">迭戈·阿方索</a></div><div class="title-figure"><a href="#">阿图罗·比达尔</a></div><div class="title-figure"><a href="#">金秀炫</a></div><div class="title-figure"><a href="#">巴黎斯</a></div></div>

效果图

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

相关文章:

  • 扩散模型:DDPM代码的学习(基于minist数据集)
  • 小程序-uniapp:URL Link / 适用于在移动端 从短信、邮件、微信外网页 等场景打开小程序任意页面
  • 干货 | 基于在线监控数据的非现场监管问题识别模型研究
  • Spring Cloud Alibaba Gateway 简单使用
  • 两种fifo实现方式的差异
  • 孜然单授权系统V1.0[免费使用]
  • kubernetes问题(一)-异常事件
  • Android Jetpack组件架构 :LiveData的使用和原理
  • 【学习笔记】Prufer序列
  • 由于找不到msvcr110.dll的5种解决方法
  • 最长连续递增子序列
  • Java学习星球,十月集训,五大赛道(文末送书)
  • 前端VUE---JS实现数据的模糊搜索
  • Android Studio 的android.jar文件在哪儿
  • Elasticsearch 部署学习
  • nodejs 如何在npm发布自己的包 <记录>
  • 移植RTOS的大体思路
  • FPGA到底是什么?
  • 算法-单词搜索 II
  • 怒刷LeetCode的第15天(Java版)
  • Android开发MVP架构记录
  • day2作业
  • Python办公自动化之Word
  • 力扣26:删除有序数组中的重复项
  • 基于C#的AE二次开发之IQueryFilter接口、ISpatialFilter接口、IQueryDef 接口的查询接口的介绍
  • Oracle 11g RAC部署笔记
  • Redis 字符串操作实战(全)
  • python LeetCode 88 刷题记录
  • 基于 Socket 网络编程
  • 关于C#.Net网页跳转的7种方法