Is it possible to achieve the same effect found here: www.lutmedia.com simply using CSS3 and HTML5...and not jquery..? Where the body background color changes on hover over the list item links..?
Yes, you could get an effect like that with pure CSS, but it won't be the body changing background, but a last list item in that menu which has position: fixed and covers the entire page.
QUICK DEMO
Relevant HTML:
<ul class='menu'>
<li><a href='#'>contact</a></li>
<li><a href='#'>blog</a></li>
<!-- and so on, menu items -->
<li class='bg'></li>
</ul>
Relevant CSS:
.menu li { display: inline-block; }
.menu li:first-child a { color: orange; }
.menu li:nth-child(2) a { color: lime; }
/* and so on for the other menu items */
.menu:hover li a { color: black; }
.menu li a:hover { color: white; }
.bg {
position: fixed;
z-index: -1;
top: 0; right: 0; bottom: 0; left: 0;
background: dimgrey;
transition: .5s;
pointer-events: none;
}
.menu li:first-child:hover ~ .bg { background: orange; }
.menu li:nth-child(2):hover ~ .bg { background: lime; }
/* and so on for the other menu items */
来源:https://stackoverflow.com/questions/15179968/changing-body-background-color-using-only-html5-and-css3