1document.getElementById("mydiv").onmouseover= function(e){this.className += ' my-special-class'; };
2document.getElementById("mydiv").onmouseleave= function(e){this.className = this.className.replace('my-special-class',''); };
1.hover-item {
2 background-color: #FFF;
3}
4
5.hover-item:hover {
6 background-color: inherit;
7}
8<a style="background-color: red;">
9 <div class="hover-item">
10 Content
11 </div>
12</a