|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
|
@ -48,6 +48,30 @@ body {
|
|||
position: relative;
|
||||
}
|
||||
|
||||
#win10 .blur {
|
||||
-webkit-filter: blur(8px); /* Chrome, Opera */
|
||||
-moz-filter: blur(8px);
|
||||
-ms-filter: blur(8px);
|
||||
filter: blur(8px);
|
||||
filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=8, MakeShadow=false);
|
||||
transition: filter 0.3s;
|
||||
transition: -webkit-filter 0.3s;
|
||||
transition: -moz-filter 0.3s;
|
||||
transition: -ms-filter 0.3s;
|
||||
}
|
||||
|
||||
#win10 .desktop .background {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -999;
|
||||
transform: scale3d(1.1, 1.1, 1);
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
#win10 *{
|
||||
scrollbar-arrow-color: #5e6a5c; /*图6,三角箭头的颜色*/
|
||||
scrollbar-face-color: #5e6a5c; /*图5,立体滚动条的颜色*/
|
||||
|
|
@ -75,7 +99,7 @@ body {
|
|||
height: 30px;
|
||||
line-height:30px;
|
||||
/* IE9+ */
|
||||
background-color:rgba(255,255,255,0.5);
|
||||
background-color:rgba(255,255,255,0.4);
|
||||
/* IE6-IE8 */
|
||||
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr=#68FFFFFF,endColorStr=#68FFFFFF);
|
||||
z-index: 19930813;
|
||||
|
|
@ -696,12 +720,12 @@ body {
|
|||
}
|
||||
|
||||
/*右键菜单*/
|
||||
#win10 .win10-context-menu { left: 0;top: 0;position: fixed; width: 150px; height: auto; background-color: rgb(255, 255, 255,0.75); border: #CCC 1px solid; display: block; border-radius: 5px; z-index: 99999999; }
|
||||
#win10 .win10-context-menu { left: 0;top: 0;position: fixed; width: 150px; height: auto; background-color: rgba(255, 255, 255,0.75); border: #CCC 1px solid; display: block; border-radius: 5px; z-index: 99999999; }
|
||||
#win10 .win10-context-menu ul { margin: 0px; padding: 0px; }
|
||||
#win10 .win10-context-menu ul li {transition: background-color 0.5s;cursor: default;padding: 0px 1em; list-style: none; line-height: 30px; height: 30px; margin: 3px 0; font-size: 13px; }
|
||||
#win10 .win10-context-menu ul li:hover { background-color: rgba(49,156,241,0.71);cursor: pointer; }
|
||||
#win10 .win10-context-menu ul li a {text-decoration: none; display: block; height: 100%; color: #333; outline: none; }
|
||||
#win10 .win10-context-menu ul hr { margin: 0; height: 0px; border: 0px; border-bottom: rgb(233,233,233) 1px solid;border-top: none }
|
||||
#win10 .win10-context-menu ul hr { margin: 0; height: 0px; border: 0px; border-bottom: rgba(233,233,233) 1px solid;border-top: none }
|
||||
|
||||
/*块级按钮*/
|
||||
.win10-open-iframe .layui-layer-ico{background-image:none;}
|
||||
|
|
|
|||
11
demo.html
|
|
@ -11,15 +11,10 @@
|
|||
<link href="./css/macdefault.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="./js/jquery-2.2.4.min.js"></script>
|
||||
<script type="text/javascript" src="./js/interface.js"></script>
|
||||
<script type="text/javascript" src="./component/layer-v3.0.3/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="./component/layer-v3.1.1/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="./js/mac.js"></script>
|
||||
<link rel="stylesheet" href="./plugins/shortcut-drawer/shortcut-drawer.min.css">
|
||||
<script type="text/javascript" src="./plugins/shortcut-drawer/shortcut-drawer.min.js"></script>
|
||||
<style>
|
||||
* {
|
||||
font-family: "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
Win10.onReady(function () {
|
||||
|
||||
|
|
@ -102,8 +97,7 @@
|
|||
<div class="title">切换壁纸</div>
|
||||
</div>
|
||||
<div class="shortcut win10-drawer">
|
||||
<img class="icon" src="./img/icon/folder.png"/><!--
|
||||
<i class="icon fa fa-fw fa-folder" style="color: blue;font-size: 50px;"></i> -->
|
||||
<img class="icon" src="./img/icon/folder.png"/>
|
||||
<div class="title">新建文件夹</div>
|
||||
<div class="win10-drawer-box">
|
||||
<div class="shortcut-drawer win10-drawer">
|
||||
|
|
@ -127,6 +121,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="background blur"></div>
|
||||
</div>
|
||||
|
||||
<div id="win10-menu" class="hidden">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<link href="./css/macdefault.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="./js/jquery-2.2.4.min.js"></script>
|
||||
<script type="text/javascript" src="./js/interface.js"></script>
|
||||
<script type="text/javascript" src="./component/layer-v3.0.3/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="./component/layer-v3.1.1/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="./js/mac.js"></script>
|
||||
<link rel="stylesheet" href="./plugins/shortcut-drawer/shortcut-drawer.min.css">
|
||||
<script type="text/javascript" src="./plugins/shortcut-drawer/shortcut-drawer.min.js"></script>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
<div class="win10-drawer-box">
|
||||
<div class="shortcut-drawer win10-drawer">
|
||||
<img class="icon" src="./img/icon/folder.png"/>
|
||||
<div class="title">三级菜单</div>
|
||||
<div class="title">新建文件夹</div>
|
||||
<div class="win10-drawer-box">
|
||||
<div class="shortcut-drawer win10-open-window" data-url="www.baidu.com">
|
||||
<i class="icon fa fa-fw fa-th-list orange"></i>
|
||||
|
|
@ -86,7 +86,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="background blur"></div>
|
||||
</div>
|
||||
|
||||
<div id="win10-menu" class="hidden">
|
||||
<div class="list win10-menu-hidden animated animated-slideOutLeft">
|
||||
<div class="item" onclick="Win10.aboutUs()"><i class="icon fa fa-star fa-fw"></i>关于</div>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
!function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("plugin.backgroundBlur"),o=t.extend({},r.DEFAULTS,i.data(),"object"==typeof e&&e);n||i.data("plugin.backgroundBlur",n=new r(this,o)),"fadeIn"===e?n.fadeIn():"fadeOut"===e?n.fadeOut():"string"==typeof e&&n.generateBlurredImage(e)})}var i=function(){for(var t,e=3,i=document.createElement("div"),n=i.getElementsByTagName("i");i.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->",n[0];);return e>4?e:t}(),n=function(){return"_"+Math.random().toString(36).substr(2,9)},o={svgns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",createElement:function(t,e){var i=document.createElementNS(o.svgns,t);return e&&o.setAttr(i,e),i},setAttr:function(t,e){for(var i in e)"href"===i?t.setAttributeNS(o.xlink,i,e[i]):t.setAttribute(i,e[i]);return t}},r=function(e,i){this.internalID=n(),this.$element=t(e),this.$width=this.$element.width(),this.$height=this.$element.height(),this.element=e,this.options=t.extend({},r.DEFAULTS,i),this.$overlayEl=this.createOverlay(),this.$blurredImage={},this.useVelocity=this.detectVelocity(),this.attachListeners(),this.generateBlurredImage(this.options.imageURL)};r.VERSION="0.0.1",r.DEFAULTS={imageURL:"",blurAmount:10,imageClass:"",overlayClass:"",duration:!1,opacity:1},r.prototype.detectVelocity=function(){return!!window.jQuery.Velocity},r.prototype.attachListeners=function(){this.$element.on("ui.blur.loaded",t.proxy(this.fadeIn,this)),this.$element.on("ui.blur.unload",t.proxy(this.fadeOut,this))},r.prototype.fadeIn=function(){this.options.duration&&this.options.duration>0&&(this.useVelocity?this.$blurredImage.velocity({opacity:this.options.opacity},{duration:this.options.duration}):this.$blurredImage.animate({opacity:this.options.opacity},{duration:this.options.duration}))},r.prototype.fadeOut=function(){this.options.duration&&this.options.duration>0?this.useVelocity?this.$blurredImage.velocity({opacity:0},{duration:this.options.duration}):this.$blurredImage.animate({opacity:0},{duration:this.options.duration}):this.$blurredImage.css({opacity:0})},r.prototype.generateBlurredImage=function(t){var e=this.$blurredImage;this.internalID=n(),e.length>0&&(this.options.duration&&this.options.duration>0?this.useVelocity?e.first().velocity({opacity:0},{duration:this.options.duration,complete:function(){e.remove()}}):e.first().animate({opacity:0},{duration:this.options.duration,complete:function(){e.remove()}}):e.remove()),this.$blurredImage=i?this.createIMG(t,this.$width,this.$height):this.createSVG(t,this.$width,this.$height)},r.prototype.createOverlay=function(){return this.options.overlayClass&&""!==this.options.overlayClass?t("<div></div>").prependTo(this.$element).addClass(this.options.overlayClass):!1},r.prototype.createSVG=function(e,i,n){var r=this,s=o.createElement("svg",{xmlns:o.svgns,version:"1.1",width:i,height:n,id:"blurred"+this.internalID,"class":this.options.imageClass,viewBox:"0 0 "+i+" "+n,preserveAspectRatio:"none"}),a="blur"+this.internalID,u=o.createElement("filter",{id:a}),l=o.createElement("feGaussianBlur",{"in":"SourceGraphic",stdDeviation:this.options.blurAmount}),h=o.createElement("image",{x:0,y:0,width:i,height:n,externalResourcesRequired:"true",href:e,style:"filter:url(#"+a+")",preserveAspectRatio:"none"});h.addEventListener("load",function(){r.$element.trigger("ui.blur.loaded")},!0),h.addEventListener("SVGLoad",function(){r.$element.trigger("ui.blur.loaded")},!0),u.appendChild(l),s.appendChild(u),s.appendChild(h);var d=t(s);return r.options.duration&&r.options.duration>0&&(d.css({opacity:0}),window.setTimeout(function(){"0"===d.css("opacity")&&d.css({opacity:1})},this.options.duration+100)),this.element.insertBefore(s,this.element.firstChild),d},r.prototype.createIMG=function(t,e,i){var n=this,o=this.prependImage(t),r=2*this.options.blurAmount>100?100:2*this.options.blurAmount;return o.css({filter:"progid:DXImageTransform.Microsoft.Blur(pixelradius="+r+") ",top:2.5*-this.options.blurAmount,left:2.5*-this.options.blurAmount,width:e+2.5*this.options.blurAmount,height:i+2.5*this.options.blurAmount}).attr("id","blurred"+this.internalID),o.load(function(){n.$element.trigger("ui.blur.loaded")}),this.options.duration&&this.options.duration>0&&window.setTimeout(function(){"0"===o.css("opacity")&&o.css({opacity:1})},this.options.duration+100),o},r.prototype.prependImage=function(e){var i,n=t('<img src="'+e+'" />');return i=this.$overlayEl?n.insertBefore(this.$overlayEl).attr("id",this.internalID).addClass(this.options.imageClass):n.prependTo(this.$element).attr("id",this.internalID).addClass(this.options.imageClass)};var s=t.fn.backgroundBlur;t.fn.backgroundBlur=e,t.fn.backgroundBlur.Constructor=r,t.fn.backgroundBlur.noConflict=function(){return t.fn.backgroundBlur=s,this}}(jQuery);
|
||||
19
js/mac.js
|
|
@ -115,22 +115,7 @@ window.Win10 = {
|
|||
|
||||
//开始渲染壁纸模糊
|
||||
if(Win10._wallpaperBlur){
|
||||
this.loadScript('js/background-blur.min.js',function(){
|
||||
var $avatarHolderEl = $('#win10');
|
||||
$avatarHolderEl.backgroundBlur({
|
||||
imageURL : Win10._bgs.main,
|
||||
blurAmount : 20,
|
||||
imageClass : 'avatar-blur'
|
||||
});
|
||||
});
|
||||
$.getScript("js/background-blur.min.js",function(){ //加载test.js,成功后,并执行回调函数
|
||||
var $avatarHolderEl = $('#win10');
|
||||
$avatarHolderEl.backgroundBlur({
|
||||
imageURL : Win10._bgs.main,
|
||||
blurAmount : 20,
|
||||
imageClass : 'avatar-blur'
|
||||
});
|
||||
});
|
||||
$('.background').addClass('blur');
|
||||
}
|
||||
},
|
||||
//动态加载JS文件
|
||||
|
|
@ -187,7 +172,7 @@ window.Win10 = {
|
|||
}, 50)
|
||||
},
|
||||
_setBackgroundImg:function (img) {
|
||||
$('#win10').css('background-image','url('+img+')')
|
||||
$('#win10 .background').css('background-image','url('+img+')')
|
||||
},
|
||||
_settop:function (layero) {
|
||||
if(!isNaN(layero)){
|
||||
|
|
|
|||