我已经浏览了整个互联网,但发现没有任何效果.
我希望我的图像不被选中,就像带有背景图像的div(<div style = "background-image : 'moo.png';"> </div>)
我不能使用背景图像,因为我需要一个图像映射功能.
我的代码看起来像这样:
CSS,
.filmmakers #map {
-moz-user-select : -moz-none;
-khtml-user-select : none;
-webkit-user-select : none;
-ms-user-select : none;
-o-user-select : none;
user-select : none;
}
.filmmakers #map::selection {
color : rgba(0, 0, 0, 0);
}
Run Code Online (Sandbox Code Playgroud)
HTML,
<img id = "map" src = "WorldMap.png" alt = "Map" unselectable = "on" style = "left : 0px; top : 0px;" />
Run Code Online (Sandbox Code Playgroud)
JavaScript的,
var map = document.getElementById('map');
makeUnselectable(map);
function makeUnselectable(node) {
if (node.nodeType == …Run Code Online (Sandbox Code Playgroud) 我不知道怎么做,但我希望有2个重复的纹理,一个重复到左边,一个重复到右边.
代替:
#header {
background-image : Url('My_Two_Textures_Combined.png');
background-repeat : repeat-x; /*Which repeats my joined textures a long the x axis*/
}
Run Code Online (Sandbox Code Playgroud)
我想要:
#header {
background-image : Url('My_Left_Texture');
background-repeat : repeat-x-left; /*Which would ideally repeat my texture to the left on the x axis*/
background-image : Url('My_Right_Texture');
background-repeat : repeat-x-Right; /*Which would ideally repeat my texture to the right on the x axis*/
}
Run Code Online (Sandbox Code Playgroud)
我希望有一种方法可以做到这一点,因为我觉得它在我的网站上看起来不错.我将尝试查看其他方法来执行此操作,例如使用伪命令或其他方法.如果我找到任何东西,我会在这里发布!
可能重复:
如何禁用右键单击我的网页?
说我有这个很酷的形象,我不希望它不偷,我不希望别人查看源代码,遗憾的是,由于一些未知的原因,他们所要做的就是打开网页检查,他们有你的形象,CSS,HTML,一切!
为什么这里什么都没有?
我不想在互联网上的任何其他地方看到我非常棒的形象.
如果有人可以帮助我,我会很高兴.
(我知道那里的人有非常棒的图像,谁知道,我才知道!)
干杯^^
Mithos
编辑:他们是怎么做到的?https://dl.dropbox.com/u/107533178/Screen%20shot%202012-11-02%20at%202.00.10%20PM.png
以下是网站链接:
我想使用'鼠标拖动'在框内拖动背景的位置.
css:
.filmmakers #map {
width : 920px;
height : 500px;
margin-top : 50px;
margin-left : 38px;
border : 1px solid rgb(0, 0, 0);
cursor : move;
overflow : hidden;
background-image : url('WorldMap.png');
background-repeat : no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
html:
<div id = "map" src = "WorldMap.png" onmousedown = "MouseMove(this)"> </div>
Run Code Online (Sandbox Code Playgroud)
javascript:
function MouseMove (e) {
var x = e.clientX;
var y = e.clientY;
e.style.backgroundPositionX = x + 'px';
e.style.backgroundPositionY = y + 'px';
e.style.cursor = "move";
}
Run Code Online (Sandbox Code Playgroud)
什么都没有发生,没有错误,没有警告,什么都没有......我尝试了很多东西:div内部的绝对定位图像(你可以猜到为什么不起作用),一个带有背景图像的div内的可拖动div,一个拖放的表,最后我尝试了这个:
function MouseMove () …Run Code Online (Sandbox Code Playgroud)