<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testimg.aspx.cs" Inherits="MWeb.Services.testimg" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>testimg</title>
<script id="jscode">
function hy_rotate(obj, rotate) {
if (obj) {
function rotate_set_style(obj, key, value) {
obj.style[key] = value;
}
function rotate_float(n, b) {
b = isNaN(parseInt(b)) ? -1 : parseInt(b);
return isNaN(parseFloat(n)) ? 0 : (b == 0) ? parseInt(parseFloat(n)) : (b > 0) ? parseFloat(parseFloat(n).toString().replace((new RegExp('^(d+).(d{' + b + '})d*$')), '$1.$2')) : parseFloat(n);
}
rotate = rotate % 360;
if (rotate < 0) {
rotate = 360 + rotate
}
rotate = rotate_float(rotate, 2);
var rpi = rotate * Math.PI / 180, c = Math.cos(rpi), s = Math.sin(rpi), oh = obj.offsetHeight, ow = obj.offsetWidth, pw = rotate_float((oh * Math.abs(s) + ow * Math.abs(c)), 2), ph = rotate_float((oh * Math.abs(c) + ow * Math.abs(s)), 2), tw = (rotate % 180 == 0) ? 0 : ((pw - ow) / 2), th = (rotate % 180 == 0) ? 0 : ((ph - oh) / 2), css3 = 'translate(' + tw + 'px, ' + th + 'px) rotate(' + rotate + 'deg)', css3key = '', dbstyle = document.body.style, css3keys = ['transform', '-moz-transform', '-webkit-transform', '-o-transform', '-ms-transform'];
for (var i in css3keys) {
if (css3keys[i] in dbstyle) {
css3key = css3keys[i];
}
}
if (css3key == '') {
rotate_set_style(obj, 'filter', 'progid:DXImageTransform.Microsoft.Matrix(M11=' + c + ', M12=' + (-s) + ', M21=' + s + ', M22=' + c + ', sizingMethod='auto expand')');
} else {
obj.parentNode.style.width = pw + 'px';
obj.parentNode.style.height = ph + 'px';
rotate_set_style(obj, css3key, css3);
}
}
}
</script>
<style>
/*.list{clear:both; padding:20px;}*/
/*.block{background:#FF99FF; padding:5px; float:left;}*/
.rotate{width:170px;}
.txt{background:#3366FF; padding:10px; color:#FFFFFF; font-size:12px; margin-bottom:10px;}
/*.code{border:#3333FF dotted 1px; padding:10px; background:#FFCCFF; clear:both;}*/
</style>
</head>
<body>
<div class="txt">
<span id="rotate_num"></span>
</div>
<%--<div class="list">--%>
<%--<div class="block">
<div>--%>
<div class="rotate" id="rotate">
<%--<img src="http://www.fjsen.com/images/attachement/jpg/site2/20130513/001b77b4c2f212fa86172f.jpg" />--%>
<img src="../testimg/d.jpg" />
</div>
<%--</div>--%>
<%--</div>
</div>--%>
<script>
function $id(id) {
return document.getElementById(id);
}
var rrr = 0;
var sss = 0;
var iii = 0;
var aaa = $id('rotate');
var bbb = $id('rotate_num');
function zzz() {
rrr = rrr + 1;
bbb.innerHTML = rrr;
hy_rotate(aaa, rrr);
}
aaa.onclick = function () {
if (sss == 0) {
iii = setInterval(zzz, 20);;
sss = 1;
} else {
clearInterval(iii);
sss = 0;
}
}
</script>
</body>
</html>
相关知识
手机屏幕自动旋转怎么设置
喷灌雾化喷头喷淋自动浇花360度旋转草坪园林灌溉浇水农用洒水器 3.3元
旋转花卉图片
园林绿化农用灌溉喷淋水浇水塑料摇臂自动旋转洒水器家用草坪喷头 沈阳
一分钟学会慢门旋转模糊效果花卉拍摄新技能
旋转涂膜机器TC
时间旋转花坛的制作方法
喷头园艺360度自动浇水旋转园林灌溉花园草坪浇灌喷淋洒水器 喷头一套+花园管5米图片,高清实拍大图—苏宁易购
一种花盆定时旋转装置的制作方法
微喷倒挂大棚喷头旋转自动浇水浇花器园林灌溉农用喷灌雾化设备批发,价格,库存
网址: 图片自动旋转 https://m.huajiangbk.com/newsview795525.html
上一篇: 2021七夕节活动图片浪漫唯美图 |
下一篇: 浪漫七夕动画贺卡 把惊喜与感动送 |