鼠标悬停图像更改 [英] Mouseover image change

查看:75
本文介绍了鼠标悬停图像更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SharePoint online / 2013中没有办法在图像更改上进行简单的鼠标移植吗?



在HTML中的CSS会工作:


.myimg { 

   宽度:80%;

   身高:200px;

    background:url(/sites/x/SiteAssets/CIC/5.png);

   背景大小:100%100%;

    background-repeat:no-repeat;

}

.myimg:hover { 

    background:url(/sites/x/SiteAssets/CIC/5a.png);

   背景大小:100%100%;

    background-repeat:no-repeat;

}



或 


< a href ="">< img src ="" border = 0 name =" rollover" onmouseover =" document.rollover.src = onmouseout =" document.rollover.src =



但无论我怎么把它放进去SharePoint 2013,直接编辑html源代码或执行嵌入或内容编辑器webpart,没有翻转似乎工作。  



这是正确的论坛吗?

解决方案

嗨爱德华,


我测试了一个简单的代码我的环境,但它工作正常。


您可以在您的环境中测试它,看看会发生什么。

< html> 
< head>
< style>
.myimg {
宽度:80%;
身高:200px;
background:url(/sites/x/SiteAssets/CIC/5.png);
背景大小:100%100%;
background-repeat:no-repeat;
}
.myimg:悬停{
background:url(/sites/x/SiteAssets/CIC/5a.png);
背景大小:100%100%;
background-repeat:no-repeat;
}
< / style>
< / head>
< body>
< div class ="myimg">测试< / div>
< / body>
< / html>

您也可以在此处分享您的全部代码以供进一步研究。


最诚挚的问候,


Victoria


This there no way within SharePoint online/2013 to do simple mouse over image changes?

In CSS in HTML this would work:

.myimg { 
    width:80%;
    height:200px;
    background: url(/sites/x/SiteAssets/CIC/5.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.myimg:hover { 
    background: url(/sites/x/SiteAssets/CIC/5a.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

or 

<a href=""><img src="" border=0 name="rollover" onmouseover="document.rollover.src=onmouseout="document.rollover.src=

But no matter how I put this in SharePoint 2013, directly edit the html source or do an embed or content editor webpart, no rollover seems to work.  

Is this the right forum for this?

解决方案

Hi Edward,

I tested a simple code in my environment, however it worked fine.

You can test it in your environment to see what happens.

<html>
<head>
<style>
.myimg { 
    width:80%;
    height:200px;
    background: url(/sites/x/SiteAssets/CIC/5.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.myimg:hover { 
    background: url(/sites/x/SiteAssets/CIC/5a.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
</style>
</head>
<body>
<div class="myimg">Test</div>
</body>
</html>

You can also share your whole code here for further research.

Best Regards,

Victoria


这篇关于鼠标悬停图像更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆