<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<title>Bootstrap鼠标悬停图片遮罩特效</title>
<link href="/css/demo.css" rel="stylesheet" media="all" />
<!--[if IE]>
<style type="text/css">
li.remove_frame a {
padding-top: 5px;
background-position: 0px -3px;
}
</style>
<![endif]-->
<script src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.qrcode.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
function fixHeight() {
var headerHeight = $("#switcher").height();
$("#iframe").attr("height", $(window).height() - 54 + "px");
}
$(window).resize(function () {
fixHeight();
}).resize();
$('.icon-monitor').addClass('active');
$(".icon-mobile-3").click(function () {
$("#by").css("overflow-y", "auto");
$('#iframe-wrap').removeClass().addClass('mobile-width-3');
$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
});
$(".icon-mobile-2").click(function () {
$("#by").css("overflow-y", "auto");
$('#iframe-wrap').removeClass().addClass('mobile-width-2');
$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
});
$(".icon-mobile-1").click(function () {
$("#by").css("overflow-y", "auto");
$('#iframe-wrap').removeClass().addClass('mobile-width');
$('.icon-tablet,.icon-mobile,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
});
$(".icon-tablet").click(function () {
$("#by").css("overflow-y", "auto");
$('#iframe-wrap').removeClass().addClass('tablet-width');
$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
});
$(".icon-monitor").click(function () {
$("#by").css("overflow-y", "hidden");
$('#iframe-wrap').removeClass().addClass('full-width');
$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
});
});
</script>
<script type="text/javascript">
function Responsive($a) {
if ($a == true) $("#Device").css("opacity", "100");
if ($a == false) $("#Device").css("opacity", "0");
$('#iframe-wrap').removeClass().addClass('full-width');
$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');
$(this).addClass('active');
return false;
};
</script>
</head>
<body id="by">
<div id="switcher">
<div class="center">
<ul>
<div id="Device">
<li class="device-monitor"><a href="javascript:">
<div class="icon-monitor"></div>
</a></li>
<li class="device-mobile"><a href="javascript:">
<div class="icon-tablet"></div>
</a></li>
<li class="device-mobile"><a href="javascript:">
<div class="icon-mobile-1"></div>
</a></li>
<li class="device-mobile-2"><a href="javascript:">
<div class="icon-mobile-2"></div>
</a></li>
<li class="device-mobile-3"><a href="javascript:">
<div class="icon-mobile-3"></div>
</a></li>
</div>
<li class="top2">
<a href="javascript:void(0)">手机二维码预览</a>
<div class="vm">
<div id="output"></div>
<p style="color: #808080; margin: 10px 0 0 0;">扫一扫,直接在手机上打开</p>
</div>
</li>
<li class="logoTop">
<a href="/script/content/1788">Bootstrap鼠标悬停图片遮罩特效</a>
<script type="text/javascript">
jQuery('#output').qrcode({ width: 150, height: 150, text: window.location.href });
</script>
<li class="remove_frame"><a href="/temp/201803/Bootstrap鼠标悬停图片遮罩特效/index.html" title="移除框架"></a></li>
</ul>
</div>
</div>
<div id="iframe-wrap">
<iframe id="iframe" src="/temp/201803/Bootstrap鼠标悬停图片遮罩特效/index.html" frameborder="0" width="100%"></iframe>
</div>
<div id="footer-notice" class="kj_bottom">
<div style="width: 900px; margin: 0 auto">
<p class="left cut">
<span>名称:</span>
<a href="/script/content/1788" class="down">Bootstrap鼠标悬停图片遮罩特效</a>
<span>标签:</span><a href='/script/tags?key=图片'>图片</a><a href='/script/tags?key=bootstrap'>bootstrap</a>
</p>
<div class="clear"></div>
</div>
</div>
</body>
</html>
CSS实现鼠标悬停遮罩效果
最新推荐文章于 2024-06-01 19:28:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)