Ccs3 calc ()

Source: Internet
Author: User

Css3 supports dynamic calculation of the length and width of an element. The idea is similar to that of the previous ie CSS expression, but the function is much more powerful. It supports the +,-, *,/, Mod, Min, and Max operators.

For example:

Width: calc (25%-1em );

For more examples, see here

The Compatibility solution provided by Robert Nyman:

. Calc {width: 100px; Height: 100px; Border: 1px solid # f00; padding: 10px;/* Firefox */width:-moz-Calc (75%-100px ); /* WebKit */width:-WebKit-Calc (75%-100px);/* opera */width:-o-Calc (75%-100px ); /* standard */width: calc (75%-100px );}

For more information, see Firefox 4.0b8 and chrome 9.0.597.47.

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.