CSS Mouse response events, mouse over CSS, mouse move css, mouse click CSS

Source: Internet
Author: User

Several mouse triggers for CSS events.

Description

OnMouseDown triggered when the mouse is pressed
OnMouseOver triggered when the mouse passes over
OnMouseUp triggers when the mouse is released when the mouse is pressed
onMouseOut triggered when Mouse is moved out
OnMouseMove Touch when Mouse moves

<TITLE>CSS Mouse Response Events </title>

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">

<style type= "Text/css" >

. off{background-color: #00FF66; padding:100px;}

. Up{background-color: #FF0000; padding:100px}

</style>

<body>

<ul class=off onmouseout= "this.classname= ' Off '" onmouseover= "this.classname= ' Up ' >

<li>onmousedown triggered when the mouse is pressed

<li>onmouseover triggered when the mouse passes over

<li>onmouseup triggers when the mouse is released when the mouse is pressed

<li>onmouseout triggered when Mouse is moved out

<li>onmousemove trigger when mouse moves </li>

</ul>

</body>


<span style= "color:red;" > Mouse over table color style:<br></span>
?
<style>     table   {   background-color:# 000000;   cursor:hand;   width:100%;  }     td   {      /* Set onmouseover event */     onmouseover:   expression ( onmouseover=function   () {this.style.bordercolor   = ' Blue '; this.style.color= ' red '; this.style.backgroundcolor   = ' Yellow '});    /* set onmouseout event */      onmouseout:   expression (onmouseout=function   () {this.style.bordercolor= "; this.style.color = ";this.style.backgroundcolor   = '}");     background-color: #ffffff;     }     </style> Control Table interlacing:      Simple applications:          <style type= "Text/css" >
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.