我需要你的幫助:我如何通過jquery更改backgroundcolor?
我有一個網站,我想改變bg-coler
而懸停在菜單(如RHCP-網站),我已經嘗試過使用jQuery,但它沒有工作..
(只是要清楚,我不想改變它包含我的菜單DIV容器的背景顏色應該是全身..-->代碼)
謝謝!
代碼:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script type="text/javascript">
$('.start').hover(function() {
$('html').css('background-color', '#676767')
});
</script>
<?php include_once 'template.php' ?>
<title>Maximilian Braun</title>
</head>
<body>
<div class="start">
<h1>
<a href="actor.php" >Schauspieler</a> - <a href="foto.php">Fotograf</a>
</h1>
</div>
<?php echo footer();?>
</body>
非常感謝你! (: 這麼簡單:d 是否有可能與圖像作爲BG做到這一點我已經嘗試過使用''的背景color' background'instead –