Common functions of the math class in Java

Source: Internet
Author: User

In particular, there is a new property that allows us to control the properties of multiple elements: scoped. The new scoped attribute on the style tag allows the CSS style to take effect only on local elements, specifically, the child elements of the element that holds the style style, and the only place that is different from the usual style is the new scoped attribute:

Copy the code code as follows:
<style scoped>
/* Styles go here */
</style>

A style with the scoped property is applied only to the current element and its child elements. The inline style still has a higher precedence than the scoped style, so it's best to avoid using inline styles, and here's how to mix several styles together to compare their efficiency ranges:

Copy the code code as follows:
<div class= "Democontain lazy" >
<style scoped>
div {border:1px solid green; margin-bottom:20px; min-height:40px;}
. democontain {background: #f8f8f8;}
</style>
<div></div>
<div style= "Border-color:pink;" >
<style scoped>
div {background:lightblue; border:1px solid Blue;}
</style>
<div></div>
</div>
<div></div>
</div>

In the scoped style, you can use any of the legitimate CSS style tags, such as media queries, like this:

Copy the code code as follows:
<style scoped>
@media only screen and (max-width:1024px) {
div {background: #000;}
}
</style>

This newly emerged scoped attribute is a very useful feature, especially for those authoring templates, or CMS users, or some developers who cannot manipulate the entire style file. However, it is important to note that some older browsers do not support this property, and at such times you may need to use the JQuery plugin (https://github.com/thingsinjars/jQuery-Scoped-CSS-plugin) to compensate for this problem.

Common functions of the math class in Java

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.