我正尝试在我创建的初始页面上创建一个淡入淡出,并将其融入到我的网站的主页面中。我的网站是:http://www.simonsamuel.com/淡入淡出页面
我使用jQuery的代码是:
<script type="text/javascript">
$("#splash").click(function() {
$("#splash").fadeOut("slow");
});
</script>
这里是CSS代码:
#splash {
background-color: #ffffff;
background-image: url(http://i.imgbox.com/Al4c3tZ5.png);
background-position: center;
background-repeat: no-repeat;
position: fixed;
top: -60px;
right: 0;
bottom: 0;
left: 0;
z-index: 99999;
}
我已经尝试了许多不同的代码,但我的找不到与我的网站一起工作的人。出于好奇,我想知道是否有可能用jQuery改变网页标题?我想制作标题栏大写字体。
帮助将不胜感激,谢谢!
你使用jquery –
你的代码没有问题,是的,你可以用jQuery来改变网页标题。人们可能不愿意访问外部链接并挖掘您的源代码,以了解#splash是什么以及它是如何设置的。最后一件事,把你的代码放在文档就绪处理程序中:$(document).ready(function(){... yourcode here ...}); –
你的jQuery代码工作正常http://jsfiddle.net/你加载jQuery库吗? – Maggz