CSS class nesting

Source: Internet
Author: User

CSS code:

<style>. Chose_bonus{font-size:9px;width:400px;Border:2px solid #dddddd;Margin-top:5px;Margin-bottom:5px;padding:9px;background:#ecf3fc;Color:#FFF; }
. Chose_bonus.active{
. Chose_bonus. active{before that, not through, after the way to the above, OK
background:#ecf3fc URL (/ui/common/images/checked-blue.png) no-repeat right Bottom;
Border: 2px solid #467cbd;
 }</style>

JS Code:

<script type= "Text/javascript" >    $ ('. Chose_bonus '). Click (function() {         if ($ (this). Hasclass ("active")) {            $ (this). Removeclass ("active");          Else {            $ (this). addclass ("active");            }    )  </script>

HTML code:

            <TRclass= "Bonus">                <thwidth= "+">Optional red Envelopes</th>                <TD>                <!--{loop $bonuslist [' list '] $key $bonus} -                <Divclass= "Chose_bonus"ID= "{$bonus [' id ']}">                    <spanstyle= "Font-weight:bold;color: #000;">Red envelopes:</span><bstyle= "color: #fbb450;">Amount {$bonus [' Total_value ']} dollar remaining: {$bonus [' Balance_value ']} meta</b> <BR/>                    <spanstyle= "Font-weight:bold;color: #000;">Aging:</span><spanstyle= "color: #000; font-weight:bold;">{$bonus [' start_time ']}~{$bonus [' End_time ']}</span><BR/>                    <spanstyle= "Font-weight:bold;color: #000;">Rules:</span><spanstyle= "color: #000;">{$bonus [' Rule_value ']}</span>                </Div>                <!--{/loop} -                </TD>            </TR>

CSS class nesting

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.