滑鼠圖片html
㈠ 在html中默認顯示一張圖片滑鼠放在圖上圖片就換成另一個,當滑鼠移開
HTML:
<div><imgsrc="picture/picture3/01.jpg"width="100"/></div>
JQ:
$("div").hover(function(){
$(this).find("img").attr("src","picture/picture3/02.jpg");
},function(){
$(this).find("img").attr("src","picture/picture3/03.jpg");
});
㈡ html中如何進行滑鼠經過圖片的事件
<img src="XXX.jpg" alt="mouse"onmousemove="alert('您的滑鼠剛才經過了圖片!')">
<img src="" alt="">
後面alt="寫在這裡面的專問題就屬是你要的了"
或者
Title="您的滑鼠剛才經過了圖片!"
㈢ html中滑鼠移入滑鼠圖片蒙上灰色,且顯示圖片信息怎麼寫的
<div id="Introction_img" class="FloatLeft">
<div id="hide" style="background: rgba(255, 255, 255, 0.7)!important;
filter: Alpha(opacity=70);z-index:98;display:none; width:280px;height:200px;position: absolute;"></div>
<img id="div2" style="width:280px;height:200px;" title="學院簡介" alt="學院簡介" src="images/xyimg.jpg" />
<script type="text/javascript">
window.onload = function(){
var DIV = document.getElementById('Introction_img');
var DIV2 = document.getElementById('div2');
DIV2.onmousemove = function(){
hide.style.display='block';
hide.innerHTML='學院簡介';
}
}
</script>
</div>
把圖片替換掉就OK了。。 這樣都不給分 下一次 再不回答了。。
置換圖片路徑 就行了 其它 div 名稱不要變。
㈣ 在html中怎麼用js實現滑鼠指向圖片時圖片放大的效果(具體實現)
分別寫一個onmouseover和onmouseout事件。然後在事件裡面加一個function,分別寫想要放大的尺寸和縮小或復原的尺寸。
JavaScript官方API介面-GlobalEventHandlers.onmouseover
JavaScript官方API介面-GlobalEventHandlers.onmouseout
W3cSchool-JavaScript 事件參考手冊
㈤ html怎麼實現當滑鼠經過一個圖片時顯示另一張圖片
1、准備切換圖片素材,一般是兩張,如圖,放入img文件夾,跟HTML同級。
㈥ 求html當滑鼠停在圖片上時會出現另一張圖片時的css外聯代碼
你的css修改的是a標簽的背景;
a標簽中的內容把a標簽的背景遮住了;
很不規范的寫法,不建議給a標簽添加寬度、背景之類的屬性;
你的hover樣式沒必要重復sy1的初始樣式。
因為1、2兩點,即使你的背景是有變化的,你也看不到,始終只能看到sy1.png的內容。
你可以把div裡面的a標簽和img標簽刪掉,並將css中的a刪掉,改為對sy1的樣式。
然後鏈接的話你可以在div中加入onclick="window.open('鏈接地址')":
<divclass="sy1"onclick="window.open('鏈接地址')">
</div>
.sy1{
width:248px;
height:42px;
position:absolute;
bottom:-42px;
background:url(images/sy1.png);
display:block;
}
.sy1:hover{
background:url(images/sy2.png);
}
㈦ 在html顯示一張圖片,當滑鼠放上去換另一張圖片,滑鼠移開後換第三張
html代碼:
<div>
<img id="img" alt="測試" src="http://www.w3school.com.cn/i/eg_tulip.jpg" onMouseOver="mo()" onMouseOut="mout()"/>
</div>
js代碼:
function mo(){
document.getElementById("img").src="http://img01.taopic.com/141002/240423-14100210124112.jpg";
}
function mout(){
document.getElementById("img").src="http://img1.3lian.com/2015/w7/85/d/105.jpg";
}
望點贊
㈧ HTML,當我滑鼠移動到小圖片上面的時候,滑鼠後面就顯示大圖片
下載一下jquery插件,然後新建一個ToolTip.js文件,在該文件下寫入以下代碼:
$(function() {
var x = 10;
var y = 10;
$("a.tooltip").mouseover(function(e) {
this.myTitle = this.title;
this.title = "";
var tooltip = "<div id='tooltip'><img src='" + this.href + "' alt='產品預覽圖' width='250px' height='250px'/><\/div>"; //創建 div 元素
$("body").append(tooltip); //把它追加到文檔中
$("#tooltip")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
}).show("fast"); //設置x坐標和y坐標,並且顯示
}).mouseout(function() {
this.title = this.myTitle;
$("#tooltip").remove(); //移除
}).mousemove(function(e) {
$("#tooltip")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
});
});
})
//]]>
在頁面導入兩個.js文件,
<script src="../javascripts/jquery-1.3.1.js" type="text/javascript"></script>
<script src="../javascripts/ToolTip.js" type="text/javascript"></script>
最後把圖片綁定到a標記就可以了:
<a href="<%#DataBinder.Eval(Container.DataItem,"imageBigUrl") %>" class="tooltip"> //大圖片提示
<asp:ImageButton ID="image1" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"imageSmallUrl") %>' Width="50px" Height="50px" /></a>
㈨ HTML代碼移動滑鼠到圖片會變化是怎麼做的
是滑鼠移動到圖片會變化還是滑鼠會變化?如果是滑鼠變化,需要用js控制。
如果是圖版片變化,可以用css實現(圖權片你自己換一下):
<!DOCTYPEhtml>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>無標題文檔</title>
<styletype="text/css">
a{display:block;width:200px;height:200px;background:url(1.jpg);}
a:hover{background:url(2.jpg);}
</style>
</head>
<body>
<ahref="###"></a>
</body>
</html>
㈩ html 當滑鼠停留在圖片上 顯示另外一個div
那個透明的盒子是單獨寫的,寫好後,使用絕對定位將其移到圖片盒子區域外(比如說left:9999px;),圖片要求使用overflow:hidden;,這樣剛開始的時候就看不見文字,
然後給圖片添加hover偽類,改成你需要定位的值,滑鼠移上去顯示出來,,要慢慢下滑出來或者其他動態出來,使用css的過渡效果就行了