05 2015 档案
摘要:
引入下方的jquery.rotate.js文件,然后通过$("选择器").rotate(角度);可以旋转任意角度,
例如$("#rotate-image").rotate(45);把这句放在$(document).ready(function(){ });中
就是将id为rotate-image的图片旋转45度。
不过,貌似在Chrome中总是不显示。
唉,找了两个小时,才发现Chrome太坑爹了,没法获取图片的长宽。
解决办法是,把$("#rotate-image").rotate(45);放在
$(window).load(function(){ });中,因为在Chrome中图片在执行$(document).ready(function(){ });中的语句时并没有加载完图片,坑爹啊。
另外可以更方便的通过调用$("选择器").rotateRight()和
阅读全文
引入下方的jquery.rotate.js文件,然后通过$("选择器").rotate(角度);可以旋转任意角度,
例如$("#rotate-image").rotate(45);把这句放在$(document).ready(function(){ });中
就是将id为rotate-image的图片旋转45度。
不过,貌似在Chrome中总是不显示。
唉,找了两个小时,才发现Chrome太坑爹了,没法获取图片的长宽。
解决办法是,把$("#rotate-image").rotate(45);放在
$(window).load(function(){ });中,因为在Chrome中图片在执行$(document).ready(function(){ });中的语句时并没有加载完图片,坑爹啊。
另外可以更方便的通过调用$("选择器").rotateRight()和
阅读全文
摘要:/*** hhBase 平台js* User: huanhuan* QQ: 651471385* Email: th.wanghuan@gmail.com* 微博: huanhuan的天使* Date: 13-9-1* Time: 上午10:05* Dependence jquery-1.7.2.m...
阅读全文
摘要:jQuery限制字符字数的方法$(function(){ //限制字符个数 $(“.text”).each(function(){ var maxwidth=23;if($(this).text().length>maxwidth){ $(this).text($(this).text().sub...
阅读全文
摘要:导航页档 军事历史新闻 军事 历史新闻
阅读全文


浙公网安备 33010602011771号