函数://阻止默认跳转functionstopDefault(e){if(e&&e.preventDefault)e.preventDefault();elsewindow.event.returnValue=false;returnfalse;}使用示例://阻止所有a标签的跳转$(document).ready(functi...阅读全文
admin @ 2021-09-10 阅读(101) 评论(0) 点赞(0)
<template><viewclass=about><viewclass=lis><viewclass=liv-for=(item,index)in100:key=index>{{index}}</view></view><!--:style={top:topHeight+upx}--><view:cla...阅读全文
admin @ 2021-09-10 阅读(70) 评论(0) 点赞(0)
用css实现字体的旋转p{width:60px;height:60px;line-height:47px;font-size:20px;font-weight:bold;transform:rotate(-30deg);border-radius:50%;padding:5px;}阅读全文
admin @ 2021-09-03 阅读(100) 评论(0) 点赞(0)
<scripttype=text/javascript>window.onload=function(){if(isWeiXin()){varp=document.getElementsByTagName(p);p[0].innerHTML=window.navigator.userAgent;}}functionisWeiXin(){varua=window...阅读全文
admin @ 2021-09-03 阅读(97) 评论(0) 点赞(0)
1、实现效果2、实现原理采用绝对定位使div元素定位在左上角,在div里面画三角形作为背景。画三角的三种方法:   ①使用线性渐变的背景色,从左上角向右下角(135度角)进行渐变,渐变到50%时把颜色设...阅读全文
admin @ 2021-09-03 阅读(440) 评论(0) 点赞(0)
<script>document.oncontextmenu=newFunction(event.returnValue=false);document.onselectstart=newFunction(event.returnValue=false);varthreshold=160;window.setInterval(function(){if(window.oute...阅读全文
admin @ 2021-08-28 阅读(72) 评论(0) 点赞(0)
先看效果image这几种效果还可以做成鼠标hover效果第一种<divclass=btn1btn>流光</div>.btn1{width:100px;height:40px;border-radius:10px;background-color:#00b16a;overflow:hidden;position:relative;...阅读全文
admin @ 2021-08-26 阅读(94) 评论(0) 点赞(0)
一、css下兼容性的元素水平/垂直翻转实现随着现代浏览器对css3的支持愈发完善,对于实现各个浏览器兼容的元素的水平翻转或是垂直翻转效果也就成为了可能。相关的css代码如下:/*水平翻转*/.flipx{-moz-transform:sca...阅读全文
admin @ 2021-08-26 阅读(116) 评论(0) 点赞(0)
.bgPlay{background:url(../images/bg.jpg)no-repeat;/*background-size:autoauto||cover代表以宽或高填满元素背景*/background-size:cover;/*设置宽高值*/width:200px;height:200px;/*设置默认样式,开启3d硬件加速...阅读全文
admin @ 2021-08-26 阅读(74) 评论(0) 点赞(0)
<style>pre.btn-pre-copy{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;position:absolute;top:10px;right:12px;font-size:12px;line-hei...阅读全文
admin @ 2021-08-19 阅读(119) 评论(0) 点赞(0)
不解析html直接输出代码<xmp>html代码</xmp>css优先级!important//使用方式float:right!important;CSS动画样式transition:all.2s;-webkit-transition:all.2s;css超过宽度的文字显示点点text-overflow...阅读全文
admin @ 2021-08-19 阅读(1970) 评论(0) 点赞(0)
onReachBottom(){ lettimer=null//加载更多 if(this.jiazai){ uni.hideLoading(); return; } //阻止重复加载 if(timer!==null){ clearTimeout(timer) } timer=setTimeout(()=>this.get_ajax(),500) uni.s...阅读全文
admin @ 2021-08-19 阅读(73) 评论(0) 点赞(0)