quick.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <style>
  2. .quick.quick-quick {position:fixed; bottom:0; left:0; z-index:900; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -moz-tap-highlight-color: rgba(0, 0, 0, 0); height:60px;}
  3. .quick.quick-quick .quick-menu{background-color: #B70000; -webkit-appearance:none;outline:none;display:inline-block; width:36px !important; height:36px !important; line-height:38px !important; text-align:center !important; position:absolute; bottom:17px; left:17px; z-index:999; -moz-box-shadow:0 0 0 4px #FFFFFF, 0 2px 5px 4px rgba(0, 0, 0, 0.25); -webkit-box-shadow:0 0 0 4px #FFFFFF, 0 2px 5px 4px rgba(0, 0, 0, 0.25); box-shadow:0 0 0 4px #FFFFFF, 0 2px 5px 4px rgba(0, 0, 0, 0.25); -webkit-transition: -webkit-transform 200ms; -webkit-transform:rotate(1deg);-moz-transition: -webkit-transform 200ms; -moz-transform:rotate(1deg); color:#FFF;}
  4. .quick.quick-quick .quick-menu:before{font-size:20px;}
  5. .quick.quick-quick .quick-menu:checked{-webkit-transform:rotate(135deg);-moz-transform:rotate(135deg);}
  6. .quick.quick-quick>div {width:32px; height:32px; border-radius:32px; -moz-box-shadow:0 0 0 3px #FFFFFF, 0 2px 5px 3px rgba(0, 0, 0, 0.25); -webkit-box-shadow:0 0 0 3px #FFFFFF, 0 2px 5px 3px rgba(0, 0, 0, 0.25); box-shadow:0 0 0 3px #FFFFFF, 0 2px 5px 3px rgba(0, 0, 0, 0.25); background:#B70000; position:absolute; bottom:0; left:0; margin-bottom:20px; margin-left:20px; z-index:900; -webkit-transition: -webkit-transform 200ms;-moz-transition: -webkit-transform 200ms;}
  7. .quick.quick-quick>div a{color:#fff; font-size:20px; display: block; height: 100%; line-height: 33px; text-decoration:none; text-align: center;}
  8. .quick.quick-quick>div a i{ display:inline-block; width:20px; height:20px;}
  9. .quick.quick-quick>div.on:nth-of-type(1) {-webkit-transform: translate(0, -100px) rotate(720deg);-moz-transform: translate(0, -100px) rotate(720deg);}
  10. .quick.quick-quick>div.on:nth-of-type(2) {-webkit-transform: translate(47px, -81px) rotate(720deg);-moz-transform: translate(47px, -81px) rotate(720deg);}
  11. .quick.quick-quick>div.on:nth-of-type(3) {-webkit-transform: translate(81px, -45px) rotate(720deg);-moz-transform: translate(81px, -45px) rotate(720deg);}
  12. .quick.quick-quick>div.on:nth-of-type(4) {-webkit-transform: translate(100px, 0) rotate(720deg);-moz-transform: translate(100px, 0) rotate(720deg);}
  13. </style>
  14. <div class="quick quick-quick" id="quick-quick">
  15. <span class="quick-menu img-circle" style="background-color:#B70000;"><i class="fa fa-plus"></i></span>
  16. <input type="checkbox" id="quick-btn" class="quick-menu img-circle" style="opacity:0;" />
  17. {php $i = 1;}
  18. {loop $_W['quickmenu']['menus'] $nav}
  19. <div style="background-color:#B70000;{$nav['css']['icon']['style']}">
  20. <a href="{$nav['url']}" title="{$nav['name']}">
  21. {if !empty($nav['icon'])}
  22. <i style="background:url({media $nav['icon']}) no-repeat;background-size:cover;width:18px;height:18px;{$nav['css']['icon']['style']}"></i>
  23. {else}
  24. <i class="fa fa-fw {$nav['css']['icon']['icon']}" style="{$nav['css']['icon']['style']}"></i>
  25. {/if}
  26. </a>
  27. </div>
  28. {php if($i>4) break;}
  29. {php $i++;}
  30. {/loop}
  31. </div>
  32. <script>
  33. window.addEventListener("DOMContentLoaded", function(){
  34. var btn = document.getElementById("quick-btn");
  35. btn.onclick = function(){
  36. var divs = document.getElementById("quick-quick").querySelectorAll("div");
  37. var className = className=this.checked?"on":"";
  38. for(var i = 0;i<divs.length; i++){
  39. divs[i].className = className;
  40. }
  41. }
  42. }, false);
  43. </script>