前端经验

Javascript下拉刷新效果

!doctype html html head meta charset = utf-8 meta name = viewport content = width=device-width,initial-scale=1,user-scalable=no title 下拉刷新 / title style body { margin : 0 ; position : absolute; width : 100% ;} .loading { line-height...

前端经验

js随机漂浮的广告图片效果代码

!DOCTYPE html html head meta http-equiv = Content-Type content = text/html; charset=utf-8 / title js随机飘动的广告图片代码 / title / head body div id = main style = position:absolute; div style = text-align:right;cursor:pointer;...

前端经验

文字、图片左右无缝滚动效果--支持拖拽

!DOCTYPE html html lang = zh-CN head meta charset = utf-8 title 文字、图片无缝滚动效果--广告 / title style /*公共*/ .str_wrap { overflow :hidden; width : 100% ; font-size : 12px ; line-height : 16px ; position :relative; -moz...

前端经验

CSS滤镜设置图片变亮效果

!doctype html html lang = en head meta charset = UTF-8 title 图片变亮效果--滤镜 / title style .div { width : 200px ;} .div :hover img { -webkit-filter : grayscale ( 0 ); -moz-filter : grayscale ( 0 ); -ms-filter : grayscale ( 0 ); -...

前端经验

H5移动端Javascript拖拽效果案例

!doctype html html head meta charset = utf-8 meta name = viewport content = width=device-width,initial-scale=1,user-scalable=no title 移动端可拖拽效果 / title style .ball { position : fixed; line-height : 2.75rem ; width : 2.75rem ;...

前端经验

Javascript清除input输入框内的空格

!doctype html html lang = en head meta charset = UTF-8 title 清除输入框内的空格 / title / head body input type = text onBlur = removeSpacing(this) / script type = text/javascript function removeSpacing ( obj ) { obj.value = obj.val...

前端经验

input输入框内禁止输入空格

!doctype html html lang = en head meta charset = UTF-8 title 禁止输入空格键 / title script src = http://libs.baidu.com/jquery/1.11.3/jquery.min.js / script / head body input type = text / / body script $( input ).keydown( function (...