Ⅰ HTML中怎麼使滑鼠懸停在圖片上,使圖片變大求代碼解釋。
<!DOCTYPEhtml>
<head>
<script>
window.onload=function(){
varimg=document.getElementById("imgTest");
if(document.addEventListener){
img.addEventListener("mouseover",doMouseover,false);
img.addEventListener("mouseout",doMouseout,false);
}
elseif(document.attachEvent){
img.attachEvent("mouseover",doMouseover);
img.attachEvent("mouseout",doMouseout);
}
else{
img.onmouseover=doMouseover;
img.onmouseout=doMouseout;
}
}
functiondoMouseover(){
this.width=this.width*1.5;
this.height=this.height*1.5;
}
functiondoMouseout(){
this.width=this.width/1.5;
this.height=this.height/1.5;
}
</script>
</head>
<body>
<imgid="imgTest"src="img/barcode.jpg"/>
</body>
</html>
Ⅱ 如何實現滑鼠滑過,圖片變大的效果。且圖片變大後覆蓋頁面
這個要用jquery控制一下
這個大圖片可以是一個層,然後隱藏起來。當經過小圖的時候,獲取小層的offset位置數值,然後賦值給大圖,大圖顯示,基本上就是這原理,祝你成功
Ⅲ flash中,滑鼠經過時,圖片放大的代碼是什麼
滑鼠經過圖片放大,不需要代碼。在場景一,你在標題欄上選擇「插入」/「新建元件」,在彈出的對話框中,選擇「按鈕」,確定後,在「按鈕」編輯舞台的「彈起」幀,導入一張圖片,然後點擊「指針經過」幀,「插入關鍵幀」,並把圖片拉大,再在「點擊」幀「插入幀」。回到場景一,把這個「按鈕」元件拖到場景一,導出影片,測試效果。
Ⅳ 在html中怎麼用js實現滑鼠指向圖片時圖片放大到原圖那麼大(具體實現)
可以用js事件「onmouseover」和「onmouseout」來實現。
1、新建html文檔,在body標簽中添加圖片標簽,為這個標簽設置「id」屬性,然後設置圖片的默認顯示大小css屬性:
Ⅳ 滑鼠經過文字之後變大的CSS代碼是多少
A.nav-h:hover {font-size: 14(這里加大於12的字型大小)px; color: #ff0000; text-decoration: none; line-height:170%}
Ⅵ 關於flash滑鼠經過圖片變大的效果,百度了幾個代碼都有問題,不會解決,希望高手能詳細解答一下,謝謝~
this.button1.onPress = function() {
trace("放大");
with (_root.my_clip) {
_xscale += 10;
_yscale += 10;
}
};
this.button2.onPress = function() {
trace("縮小");
with (_root.my_clip) {
_xscale -= 10;
_yscale -= 10;
}
};
this.button3.onPress = function() {
trace("上");
with (_root.my_clip) {
_y -= 10;
}
};
this.button4.onPress = function() {
trace("下");
with (_root.my_clip) {
_y += 10;
}
};
this.button5.onPress = function() {
trace("左");
with (_root.my_clip) {
_x -= 10;
}
};
this.button6.onPress = function() {
trace("右");
with (_root.my_clip) {
_x += 10;
}
};
this.button7.onPress = function() {
trace("透明");
with (_root.my_clip) {
_alpha -= 10;
}
};
this.button8.onPress = function() {
trace("不透明");
with (_root.my_clip) {
_alpha += 10;
}
};
this.button9.onPress = function() {
trace("旋轉");
with (_root.my_clip) {
_rotation += 10;
}
};
Ⅶ div+css滑鼠指上時怎麼讓內容大小不變背景圖片變大
background-size:200px 100px; 寬高自己定
如果讓圖片成比例放大,可以使用百分比,如 background-size:110%;
Ⅷ 急求滑鼠經過圖片變為另一張圖片並放大效果的代碼
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<title>滑鼠經過圖片放大效果代碼</title>
<style>
*{ padding:0; margin:0;}
html { overflow:-moz-scrollbars-vertical; }
body{ font:12px/22px "宋體"; word-break:break-all; text-align:left; background:#C0C0C0; color:#4E4E4E;}
ul,li{ list-style:none;}
a{ color:#333; text-decoration:none;}
a:hover{ color:#ff722d; text-decoration:none;}
img{ border:0;}
a img,a:hover img{ border:0;}
.latestWeb{ width:710px; margin:10px auto 0;}
.latestWeb ul{ overflow:hidden; _height:1%;}
.latestWeb li{ float:left; border:1px solid #EBEAEA; width:160px;margin:14px 15px 0 0; background:#fff }
.trans_msg
{
filter:alpha(opacity=100,enabled=1) revealTrans(ration=.2,transition=1) blendtrans(ration=.2);
}
div.bodycontent{font-family:Arial, Helvetica, sans-serif;padding:0 10px 10px 13px;color:#555;line-height:22px;text-align:justify;text-justify:inter-ideograph;}
div.bodycontent ul{margin-left:0px}
</style>
<script language="javascript">
function toolTip(str) {
}
</script>
<script language=JavaScript>
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</script>
<style type="text/css">
<!--
.STYLE3 {color: #FFFFFF; font-size: 14px; }
-->
</style>
</head>
<body>
<div class="latestWeb">
<table width="707" bgcolor="#FFFFFF">
<tr>
<td width="355" bgcolor="#666666"><span class="STYLE3">以下是滑鼠經過圖片,跳出大圖</span></td>
<td width="340" bgcolor="#666666"><span class="STYLE3">以下是滑鼠經過圖片,圖片清晰</span></td>
</tr>
</table>
<ul>
<li>
<div><a href="#"><img src='/jscss/demoimg/201109/a.jpg ' alt="這里是文字說明" border="0" onMouseOver="toolTip('<img src=/jscss/demoimg/201109/a2.jpg>')" onMouseOut="toolTip()"></a></div>
</li>
<li>
<div><a href="#"><img src='/jscss/demoimg/201109/b.jpg ' alt="這里是文字說明" border="0" onMouseOver="toolTip('<img src=/jscss/demoimg/201109/b2.jpg>')" onMouseOut="toolTip()"></a></div>
</li>
<li>
<div><a href="#"><img src="/jscss/demoimg/201109/c.jpg" alt=這里是文字說明 border=0 style="FILTER: alpha(opacity=55)" onmouseover=nereidFade(this,100,3,5) onmouseout=nereidFade(this,50,3,5)></a></div>
</li>
<li>
<div><a href="#"><img src="/jscss/demoimg/201109/d.jpg" alt=這里是文字說明 border=0 style="FILTER: alpha(opacity=55)" onmouseover=nereidFade(this,100,3,5) onmouseout=nereidFade(this,50,3,5)></a></div>
</li>
</ul>
</div>
<script language="javascript" src="/jscss/demoimg/201109/ToolTip.js"></script>
</body>
</html>
Ⅸ 網頁製作 當滑鼠經過文字後字體會變大!在哪裡寫代碼代碼是什麼!!
把要做特效的內容放到一個<a></a>標簽裡面,然後給它設置一個css樣式:
a:hover{font-size:你想要的字體大小;}。
如果不想出現鏈接效果的話,可以把內容放到<span></span>標簽,然後用span:hover{font-size:你想要的大小;}也行。這兩種方法在IE7,8和Firefox上都可行。
如果要兼容杯具或者說餐具的IE6的話,只能用以下方法。
<a href="#" id="linkHover">你想出現效果的內容</a>
為了使得這個超鏈接表現得像普通文本內容,給這個超鏈接建立個樣式如下:
a {color:Black; text-decoration:none;cursor:default;}
a.hover, a:hover { font-size:你想要的字體大小; }
之後再用一段JS給它動態增加css樣式:
<script type="text/javascript">
<!--[if IE 6]>
document.getElementById('linkHover').onmouseover = function() {
this.className = "hover";
};
document.getElementById('linkHover').onmouseout = function() {
this.className = "";
}
<![endif]-->
</script>
至此,無論是Firefox,IE7,8還是杯具的IE6都能夠得到想要的效果了。
Ⅹ 求html中把滑鼠放在圖片上圖片能變大的代碼 急急求大神
這個有很多方式實現
第一種:改變圖片的寬和高
第二種:准備兩張解析度不同的圖片來實現放大
第一種的好處就是簡單,但是呢 效果不好 有鋸齒
第二種的好處就是效果好 但是實現難度較大
第一種的實現方式我就不說了
第二種的實現方式實際上就是獲取那張解析度較小的圖片的位置 然後按比例在解析度較大的圖片上截取 用css可以實現
具體實現 自己慢慢研究