首页前端开发HTMLcss实现随鼠标移动div渐变色效果

css实现随鼠标移动div渐变色效果

时间2024-01-24 02:23:46发布访客分类HTML浏览829
导读:收集整理的这篇文章主要介绍了css实现随鼠标移动div渐变色效果,觉得挺不错的,现在分享给大家,也给大家做个参考。 HTML @H_126_5@@H_304_7@复制代码代码如下:<div class="art">&l...
收集整理的这篇文章主要介绍了css实现随鼠标移动div渐变色效果,觉得挺不错的,现在分享给大家,也给大家做个参考。

HTML


@H_126_5@@H_304_7@复制代码代码如下:
div class="art">
div class="box lvl6">
div class="box lvl5">
div class="box lvl4">
div class="box lvl3">
div class="box lvl3">
div class="box lvl3">
div class="box lvl2">
div class="box lvl2">
div class="box lvl2">
div class="box lvl2">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
div class="box lvl1">
/div>
/div>
/div>
/div>
/div>
/div>
/div>

CSS


复制代码代码如下:
body{
background:#eCF0F1;
} /p> p> .art{
width:400px;
margin:0px auto;
} /p> p> .box{
border-radius:30%;
width:200px;
height:200px;
border:1px solid #2c3e50;
padding:10px;
opacITy:0.97;
} /p> p> .lvl1{
text-align:center;
line-height:200px;
} /p> p> .lvl1:hover{ background:#f1c40f; }
.lvl2:hover{ background:#f39c12; }
.lvl3:hover{ background:#e67e22; }
.lvl4:hover{ background:#d35400; }
.lvl5:hover{ background:#e74c3c; }
.lvl6:hover{ background:#c0392b; }

大家可运行一下代码就可以看到效果了

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

上一篇: Div + CSS一些特效使div变成圆角...下一篇:CSS三栏布局探讨——中间固定宽度...猜你在找的html5相关文章 关于移动端h5开发相关内容总结2022-05-17html5教程-学表单的第二天2018-12-10html5教程-HTML5浏览器支持2018-12-10html5教程-HTML5智能表单2018-12-10html5教程-微信H5使用resLoader实现加载页效果2018-12-10html5教程-day01-初级-JS0-热身运动JS入门教程2018-12-10html5教程-html5shiv.js和respond.min.js2018-12-10html5教程-不同浏览器对于html5 audio标签和音频格式的兼容性2018-12-10html5教程-使用Html5实现手风琴案例2018-12-10html5教程-html5笔记2018-12-10 其他相关热搜词更多phpjavapython程序员load

若转载请注明出处: css实现随鼠标移动div渐变色效果
本文地址: https://pptw.com/jishu/584911.html
浏览器跨平台使用div等标签盖住flash的另类实用解决方法 将一个DIV旋转的某一角度即90度/180度/270度及放大等问题

游客 回复需填写必要信息