我正在使用一些CSS(来自Joomla模板),如下所示:
div#logo {
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: padding;
background: transparent url(../images/head.png) no-repeat scroll 0 0;
...
}
Run Code Online (Sandbox Code Playgroud)
我已经查找了一些-moz-属性并且它们似乎被赋予了默认值,如果我在Firebug中关闭它们,则没有任何明显的事情发生.
是否有理由将它们添加到CSS文件中?它们是否适用于旧版本的Firefox?
我有这个代码,只在firefox中工作.
<script type="text/javascript">
function setVideo(url){
url = url.replace("watch?v=","v/","i");
var movie = document.getElementById('movie');
movie.setAttribute('src',url+"&hl=en&fs=1&");
var param = document.getElementById('paramm');
param.setAttribute('value',url+"&hl=en&fs=1&");
}
</script>
<object width="425" height="344">
<param name="movie" id="paramm"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed id="movie" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" src=""></embed>
</object>
<a href="#" onclick="setVideo('http://www.youtube.com/watch?v=3h1qQaRxY40')">example</a>
Run Code Online (Sandbox Code Playgroud)
请帮助,我不知道,这是一个如此简单的脚本,为什么它不工作?谢谢
我需要在网页上插入一个Hack,所以它在IE7.0上工作得很好但是我对我做事的方式有问题.应该很简单.
实际的CSS代码如下:
<style type="text/css">
body { margin:0;}
#home_splash { background-image:url(homeimages/image-background.jpg);background-repeat:repeat-x; background-position:left top;}
#home_splash #home_text { height:470px; padding-top:25px;padding-left:38px; }
#home_splash #home_text_1,
#home_splash #home_text_2 { display:none; }
#home_splash #home_text_1 { width:172px; height:58px; top:0px; left:70px; position:relative; background:inherit; background-position: -70px 0px; }
#home_splash #home_text_2 { width:212px; height:27px; top:460px; left:868px; position:relative; background:inherit; background-position: -868px -460px; }
#home_splash {background-color:#d1d1d9;margin-top:-15px; background-repeat:repeat;width:100%; }
#home_splash .picture { background-image: url(homeimage/image.jpg); width:960px; height:520px; display:block; margin-top:20px; margin-left :auto; margin-right:auto; }
#home_splash #boxes { margin-left:auto; margin-right:auto;padding-top:0px; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; color:#666; font-size:12px; …Run Code Online (Sandbox Code Playgroud) html css cross-browser internet-explorer-7 internet-explorer-6
我已经使用php/jQuery等开发了一个ajax应用程序框架.我想'要求'用户启用javascript以便使用应用程序(它们都是内部应用程序,因此我们能够指示兼容性).
如何检测服务器端是否启用了javascript?请举个例子.
#a_div {
background: rgba(200, 54, 54, 0.5);
// IE
background:transparent;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000050,endColorstr=#99000050);
zoom: 1;
}
Run Code Online (Sandbox Code Playgroud)
有没有我可以用来获取和设置不透明度到html元素的JavaScript库.需要处理跨浏览器问题.
我可以将此代码更改为某些代码,如下面的代码吗?
<style>
.FirstLetter:first-letter{font-family: arial; font-size: 14pt; font-weight: bold;color:White; background:Blue; border:1px black solid; padding-top:8px; padding-left:8px; padding-bottom:3px;}
.Spaced{letter-spacing: 5px;font-family: arial; font-size: 14pt; font-weight: bold;}
</style>
<div class="FirstLetter Spaced headerFont">
Executive Summary
</div>
<style>
.Spaced{letter-spacing: 5px;font-family: arial; font-size: 14pt; font-weight: bold;color:White; background:Blue; border:1px black solid; padding-top:8px; padding-left:8px; padding-bottom:3px;}
</style>
<div class="Spaced">
Executive Summary
</div>
Run Code Online (Sandbox Code Playgroud) 我有一些大规模嵌套的GUI控件 - 当它们被点击或更改时,或者我需要阻止事件进一步向上移动DOM树.它需要适用于所有浏览器.
在这一点上,我有一些相当笨重的JS代码:
//Do something in response to the original user action
//Leave it at that.
try {
e.stopPropagation();
}
catch (ex) {
}
try {
event.cancelBubble();
}
catch (ex) {
}
try {
event.preventDefault();
}
catch (ex) { }
...
Run Code Online (Sandbox Code Playgroud)
这确实有效,但它闻起来和感觉不对(我个人不喜欢空的挡块).我可以使用更简洁的x浏览器技巧吗?
我在相同的网页上有类似的代码,谷歌Chrome加载它就好了.但是这个特殊功能似乎只适用于某些浏览器.我自己找不到任何错误.也许我可以用不同的方式写这个陈述?
<script type="text/JavaScript">
<!--
function changeWebsite() {
var currentTime = new Date().getHours();
if (7 <= currentTime&¤tTime < 17) {
document.write(' <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC01.png" width="200" height="45" alt=""> ');
document.write(' <a href="http://www.itsnotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC02.png" width="200" height="75" border="0" alt="ItsNotch.com"></a> ');
document.write(' <a href="http://www.notchtheguru.com" <img src="http://itsnotch.com/tumblr/images/NotchTheGuru.comVC.png" width="200" height="119" border="0" alt="Tumblr"></a>');
document.write('<a href="http://www.bignotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC04.png" width="200" height="161" border="0" alt="NotchTheGuru.com"></a>');
}
else {
document.write(' <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_01.png" width="200" height="45" alt=""> ');
document.write(' <a href="http://www.itsnotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_02.png" width="200" height="75" border="0" alt="ItsNotch.com"></a> ');
document.write(' <a href="http://www.notchtheguru.com" <img src="http://itsnotch.com/tumblr/images/NotchTheGuru.com.png" width="200" height="119" …Run Code Online (Sandbox Code Playgroud) 我希望有一个div的3个背景图像.我知道CSS2和CSS3都可以处理2个图像,但它们可以处理3个吗?
背景图片纯粹是出于美观的原因,所以如果它在所有浏览器中都不起作用,那就可以了.我应该使用CSS2或CSS3吗?它们有多广泛支持?
谢谢
我正在使用免费网站.该免费网站有一个免费的应用程序.在该免费应用程序中,我可以从我的服务器运行PHP代码.
什么JavaScript代码可以获取我在服务器上从iframe调用的浏览器中显示的地址的URL?
谢谢-Ed