导航:首页 > 图片大全 > images放大图片如何继续放大

images放大图片如何继续放大

发布时间:2022-10-05 10:10:37

1. 有放大图片的按钮,点击按钮时无限放大,应该怎么解决

图片放大可以用和这个方法,图片放大后不会失真

第一步,添加需要放大的图片

2. 网站中图片放大,随意拉动的如何做。

楼主你好啊!
你说的
这个不是随意拖动,这就是从网页放大的,不用特别设置,可以更改源码里面动态的修改height和width属性

3. 怎样才能把从网上搜来的图片放大

把它拉进 PhotoshopCS3里面,那里有个工具……在你要放大图片的那个图层你单击鼠标右键,有个能将图片{转换成智能对象}点击它,然后你再按ctrt+t,修改你想要的大小,这样像素也不会改变

4. 网页上的图片点击放大效果怎么弄

还是没有太明白你的意思,希望我的回答能帮助你:
1.你可以用JS改变那张图片的SRC(路径)。如:document.getelementbyid("id").src="....";当然路径里可以带上图看的高和宽。这样来改变你的图片!
2.就是像你说的,可以Display,来显示和隐藏。
3.也可以是一个弹出层。里面引用的一张较大的图片,这个代码有点多。如果需要可以发MAIL我([email protected])
关于页面图片没有变化的问题有可能是你IE缓存的问题。你可以在你的路径后加上?id=1...
如:http://www.123.com?id=“+Math.random()。这样并没有什么意义只是改一下路径,不再从缓存里读已存的资料 。

5. HTML实现网页上图片放大功能代码 就像新浪微博图片放大一样的那种,点一下放大再点一下就变成原来的状态。

<head>
<bgsound src="路径" loop="-1">/* ===== 背景音乐 ==== */
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>图片欣赏</title>
<style type="text/css">
html {
overflow: hidden;
}

body {
margin: 0px;
padding: 0px;
background: #000;
position: absolute;
width: 100%;
height: 100%;
cursor: crosshair;
}

#diapoContainer {
position: absolute;
left: 10%;
top: 10%;
width: 80%;
height: 80%;
background: #222;
overflow: hidden;
}

.imgDC {
position: absolute;
cursor: pointer;
border: #000 solid 2px;
filter: alpha(opacity=90);
opacity: 0.9;
visibility: hidden;
}

.spaDC {
position: absolute;
filter: alpha(opacity=20);
opacity: 0.2;
background: #000;
visibility: hidden;
}

.imgsrc {
position: absolute;
width: 120px;
height: 67px;
visibility: hidden;
margin: 4%;
}

#bkgcaption {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
height: 6%;
background:#1a1a1a;
}
#caption {
position: absolute;
font-family: arial, helvetica, verdana, sans-serif;
white-space: nowrap;
color: #fff;
bottom: 0px;
width: 100%;
left: -10000px;
text-align: center;
}

</style>
<script type="text/javascript">
var xm;
var ym;

/* ==== onmousemove event ==== */
document.onmousemove = function(e){
if(window.event) e=window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}

/* ==== window resize ==== */
function resize() {
if(diapo)diapo.resize();
}
onresize = resize;

/* ==== opacity ==== */
setOpacity = function(o, alpha){
if(o.filters)o.filters.alpha.opacity = alpha * 100; else o.style.opacity = alpha;
}

////////////////////////////////////////////////////////////////////////////////////////////
/* ===== encapsulate script ==== */
diapo = {
O : [],
DC : 0,
img : 0,
txt : 0,
N : 0,
xm : 0,
ym : 0,
nx : 0,
ny : 0,
nw : 0,
nh : 0,
rs : 0,
rsB : 0,
zo : 0,
tx_pos : 0,
tx_var : 0,
tx_target : 0,

/////// script parameters ////////
attraction : 2,
acceleration : .9,
dampening : .1,
zoomOver : 2,
zoomClick : 6,
transparency : .8,
font_size: 18,
//////////////////////////////////

/* ==== diapo resize ==== */
resize : function(){
with(this){
nx = DC.offsetLeft;
ny = DC.offsetTop;
nw = DC.offsetWidth;
nh = DC.offsetHeight;
txt.style.fontSize = Math.round(nh / font_size) + "px";
if(Math.abs(rs-rsB)<100) for(var i=0; i<N; i++) O[i].resize();
rsB = rs;
}
},

/* ==== create diapo ==== */
CDiapo : function(o){
/* ==== init variables ==== */
this.o = o;
this.x_pos = this.y_pos = 0;
this.x_origin = this.y_origin = 0;
this.x_var = this.y_var = 0;
this.x_target = this.y_target = 0;
this.w_pos = this.h_pos = 0;
this.w_origin = this.h_origin = 0;
this.w_var = this.h_var = 0;
this.w_target = this.h_target = 0;
this.over = false;
this.click = false;

/* ==== create shadow ==== */
this.spa = document.createElement("span");
this.spa.className = "spaDC";
diapo.DC.appendChild(this.spa);

/* ==== create thumbnail image ==== */
this.img = document.createElement("img");
this.img.className = "imgDC";
this.img.src = o.src;
this.img.O = this;
diapo.DC.appendChild(this.img);
setOpacity(this.img, diapo.transparency);

/* ==== mouse events ==== */
this.img.onselectstart = new Function("return false;");
this.img.ondrag = new Function("return false;");
this.img.onmouseover = function(){
diapo.tx_target=0;
diapo.txt.innerHTML=this.O.o.alt;
this.O.over=true;
setOpacity(this,this.O.click?diapo.transparency:1);
}
this.img.onmouseout = function(){
diapo.tx_target=-diapo.nw;
this.O.over=false;
setOpacity(this,diapo.transparency);
}
this.img.onclick = function() {
if(!this.O.click){
if(diapo.zo && diapo.zo != this) diapo.zo.onclick();
this.O.click = true;
this.O.x_origin = (diapo.nw - (this.O.w_origin * diapo.zoomClick)) / 2;
this.O.y_origin = (diapo.nh - (this.O.h_origin * diapo.zoomClick)) / 2;
diapo.zo = this;
setOpacity(this,diapo.transparency);
} else {
this.O.click = false;
this.O.over = false;
this.O.resize();
diapo.zo = 0;
}
}

/* ==== rearrange thumbnails based on "imgsrc" images position ==== */
this.resize = function (){
with (this) {
x_origin = o.offsetLeft;
y_origin = o.offsetTop;
w_origin = o.offsetWidth;
h_origin = o.offsetHeight;
}
}

/* ==== animation function ==== */
this.position = function (){
with (this) {
/* ==== set target position ==== */
w_target = w_origin;
h_target = h_origin;
if(over){
/* ==== mouse over ==== */
w_target = w_origin * diapo.zoomOver;
h_target = h_origin * diapo.zoomOver;
x_target = diapo.xm - w_pos / 2 - (diapo.xm - (x_origin + w_pos / 2)) / (diapo.attraction*(click?10:1));
y_target = diapo.ym - h_pos / 2 - (diapo.ym - (y_origin + h_pos / 2)) / (diapo.attraction*(click?10:1));
} else {
/* ==== mouse out ==== */
x_target = x_origin;
y_target = y_origin;
}
if(click){
/* ==== clicked ==== */
w_target = w_origin * diapo.zoomClick;
h_target = h_origin * diapo.zoomClick;
}

/* ==== magic spring equations ==== */
x_pos += x_var = x_var * diapo.acceleration + (x_target - x_pos) * diapo.dampening;
y_pos += y_var = y_var * diapo.acceleration + (y_target - y_pos) * diapo.dampening;
w_pos += w_var = w_var * (diapo.acceleration * .5) + (w_target - w_pos) * (diapo.dampening * .5);
h_pos += h_var = h_var * (diapo.acceleration * .5) + (h_target - h_pos) * (diapo.dampening * .5);
diapo.rs += (Math.abs(x_var) + Math.abs(y_var));

/* ==== html animation ==== */
with(img.style){
left = Math.round(x_pos) + "px";
top = Math.round(y_pos) + "px";
width = Math.round(Math.max(0, w_pos)) + "px";
height = Math.round(Math.max(0, h_pos)) + "px";
zIndex = Math.round(w_pos);
}
with(spa.style){
left = Math.round(x_pos + w_pos * .1) + "px";
top = Math.round(y_pos + h_pos * .1) + "px";
width = Math.round(Math.max(0, w_pos * 1.1)) + "px";
height = Math.round(Math.max(0, h_pos * 1.1)) + "px";
zIndex = Math.round(w_pos);
}
}
}
},

/* ==== main loop ==== */
run : function(){
diapo.xm = xm - diapo.nx;
diapo.ym = ym - diapo.ny;
/* ==== caption anim ==== */
diapo.tx_pos += diapo.tx_var = diapo.tx_var * .9 + (diapo.tx_target - diapo.tx_pos) * .02;
diapo.txt.style.left = Math.round(diapo.tx_pos) + "px";
/* ==== images anim ==== */
for(var i in diapo.O) diapo.O[i].position();
/* ==== loop ==== */
setTimeout("diapo.run();", 16);
},

/* ==== load images ==== */
images_load : function(){
// ===== loop until all images are loaded =====
var M = 0;
for(var i=0; i<diapo.N; i++) {
if(diapo.img[i].complete) {
diapo.img[i].style.position = "relative";
diapo.O[i].img.style.visibility = "visible";
diapo.O[i].spa.style.visibility = "visible";
M++;
}
resize();
}
if(M<diapo.N) setTimeout("diapo.images_load();", 128);
},

/* ==== init script ==== */
init : function() {
diapo.DC = document.getElementById("diapoContainer");
diapo.img = diapo.DC.getElementsByTagName("img");
diapo.txt = document.getElementById("caption");
diapo.N = diapo.img.length;
for(i=0; i<15; i++) diapo.O.push(new diapo.CDiapo(diapo.img[i]));
diapo.resize();
diapo.tx_pos = -diapo.nw;
diapo.tx_target = -diapo.nw;
diapo.images_load();
diapo.run();
}
}

</script>
</head>

<body>

<div id="diapoContainer">
<img class="imgsrc" src="图片的路径(相对路径或绝对路径)" alt="图片的注释(第一张)">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<img class="imgsrc" src="同上" alt="同上">
<div id="bkgcaption">
</div>
<div id="caption">
</div>
</div>
<script type="text/javascript">
/* ==== start script ==== */
function dom_onload() {
if(document.getElementById("diapoContainer")) diapo.init(); else setTimeout("dom_onload();", 128);
}
dom_onload();

</script>

</body>

</html>

6. 在网页里点开放大了一张图片后,怎么实现随鼠标滚轮放大缩小

你用JS设计一下鼠标的点击事件,然后实现滑轮的缩放。

7. 怎么用js实现图片点击时放大,再点击恢复

用js实现图片点击时放大,再点击恢复的方法:
1、页面定义区片区域:

<img src="Images/home.jpg" id="Img1" width="118" height="106" border="0">
<img src="Images/machine.jpg" id="Img2" width="118" height="106" border="0">
<img src="Images/title_Mixie.jpg" id="Img3" width="118" height="106" border="0">

2、定义js方法的mouseover和mouseout事件:
$(document).ready(function () {
$('#Img1, #Img2, #Img3').mouseover(function () {
$(this).animate({ width: "122px", height: "110px" }, 100);
});当鼠标放上去的时候,图片变大
$('#Img1, #Img2, #Img3').mouseout(function () {
$(this).animate({ width: "118px", height: "106px" }, 100);
});当鼠标离开的时候,图片还原为原来的尺寸
});

8. 图片放大代码啊.

这个改一下函数就行了,看看能不能达到你想要的效果
<img src="images/2.jpg" id="img_1" onmouseover="letBig(this)" onmouseout="letsmall(this)" style="width:100px;height:100px"><script>function letBig(obj){obj.style.width =parseInt( obj.style.width) * 2 ;obj.style.height =parseInt( obj.style.height) *2;}
function letsmall(obj){obj.style.width =parseInt( obj.style.width)/2 ;obj.style.height =parseInt( obj.style.height)/2;}
</script>

9. Topaz Gigapixel AI如何无损放大修复照片

Topaz Gigapixel AI是一款无损放大修复照片的软件,它主要运用自动调节、高级插值算法等技术,进行人为像素补充,放大修复效果十分不错。

不过这款软件为英文版,所以很多朋友都不知道如何运用,咱们今天就来简单了解一下它最基本的功能。

1、首先我们下载安装好Topaz Gigapixel AI,安装的时候安装在除C盘以外的任何盘符都可以。(注意一点,安装好以后,如果打开提醒升级,选择NO)

4、这是一张720X613的水果照片,我放大1.5倍至1080X920,我们可以看到修复的效果还是不错的,原照片比较模糊,修复后边缘清晰了很多,而且色彩明亮了很多,应用常见还是很多的,关键是一键操作,比较简单。

除了上文提到的Topaz Gigapixel AI放大修复软件,其实PhotoZoom、bigjpg的效果都还算不错,大家可以对比一下效果,选择最适合自己的修复软件。

阅读全文

与images放大图片如何继续放大相关的资料

热点内容
烧饼烤炉图片及价格 浏览:333
黑盆帽搭配衣服图片 浏览:880
浪漫动漫男生图片唯美图片 浏览:816
可爱鸟儿特写图片 浏览:259
床栏杆图片价格大全 浏览:616
简单纸伞图片 浏览:600
美女背影唯美图片短发 浏览:203
白色男生发型图片 浏览:164
落日洒金辉高清图片 浏览:524
网购客服如何发图片 浏览:991
小女孩的卡通图片可爱 浏览:952
额头发型图片欣赏 浏览:231
剪发型图片女儿童 浏览:636
分开的图片可爱 浏览:710
男生普通卧室图片白色被子单人 浏览:343
送给准高一女生日蛋糕图片 浏览:60
4年级班徽设计图片简单 浏览:940
表白老子的图片男生 浏览:186
农村养鸭高清图片 浏览:857
放飞梦想的女孩图片 浏览:924