100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > js鼠标悬浮出现遮罩层办法【javascript】

js鼠标悬浮出现遮罩层办法【javascript】

时间:2020-03-01 13:25:03

相关推荐

js鼠标悬浮出现遮罩层办法【javascript】

web前端|js教程

js,鼠标,悬浮,遮罩层,方法

web前端-js教程

本文实例讲述了js鼠标悬浮出现遮罩层的方法。分享给大家供大家参考。具体实现方法如下:

社区管理系统 jsp源码,vscode 文件扩展名,ubuntu中base,其他电脑访问tomcat,python 爬虫例程,php支付宝验证失败,庐江seo优化费用多少,网站源码下载c,api模板lzw

html页面代码:

php 个人源码,ubuntu系统更新时,tomcat6文字乱码,网络爬虫python京东,不用php可以做动态网站吗,吉林推广seolzw

科学

动漫

生活

插画

音乐

自然

js代码:

电子报刊系统 php源码,vscode置顶代码,ubuntu显示网速,怎么修改tomcat的端口号,sqlite引用,海贼王网页设计模板,从数据库中随机读取数据,阿里云服务器迁移可靠吗,播放器下载插件,前端 可视化布局框架,携程酒店爬虫,php 7.1,seo排名技巧,springboot小程序员,织梦指定链接标签,大学社团网站源码,手机网页默认字体,uc模板设置在哪,免费网站模板带后台下载,html留言板页面,学生管理系统源代码 c,java聊天程序实验报告lzw

$(function () {

//遮罩层,鼠标移动上去高度变化,变清晰

var $site_li = $(".site-tag li");

$site_li.hover(function () {

var indexs = $site_li.index(this);

$(this).css("height", "90").find(".tag-tit").css("top", "30").css("color", "#fff");

//获取当前点击li元素在全部li元素中的索引

//alert(indexs+1);

$(this).prev().css("height", "30");

$(this).next().css("height", "30");

}, function () {

$site_li.css("height", "50");

});

});

css代码:

ul li{ list-style:none;}

.site-tag{ width:200px; overflow:hidden; z-index:5;}

.site-tag li{ position:relative; width:200px; height:50px; margin-bottom:1px; overflow:hidden;

transition:height 0.5s ease; -webkit-transition:height 0.5s ease;

-moz-transition:height 0.5s ease; -o-transition:height 0.5s ease;}

.site-tag li a { color: #666; font-size: 16px; font-weight: bold;line-height: 50px;}

.site-tag li i{ display:block; height:90px; background-position:center center;

opacity:0.3; filter:alpha(opacity=3); /*设置透明度*/

-webkit-transition:opacity 0.5 ease; /**/

-webkit-filter:grayscale(60%); /**/

}

.site-tag li:hover i { opacity:0.9; -webkit-filter:grayscale(0%); transition:opacity 0.5s ease;}

.tag-tit{ display:block; height:100px; width:700px; color:#666; font-size:14px;}

.site-tag li .tag-tit{ position:absolute; top:0px; left:10px; text-shadow:1px 1px 1px rgb(0,0,0,0.1);}

a:hover .tag-tit{ text-shadow:1px 1px 1px rgb(0,0,0,0.5);}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。