Adapt to Web sites that contain different skins. Part Style method

Source: Internet
Author: User

Yesterday morning colleagues in the group found a problem with the project because our current project used Easyui which had skin switching.

Some pages contain fieldset tags, which are not defined in the skin CSS.

The label at the time was this:

The problem is that the edges of fieldset do not change as the skin changes.

In the afternoon, he was still revising the question, and I asked him why he got it: he was looking for a page on a page to change the label.

The project is very urgent, this is certainly not possible. So I added a section of JS code on the page:

Problem solving.

In fact, this method is for me to save time, use JQuery to take the page main tone and then assign the value to the label.

The formal solution to this problem is actually:

(1) Find the corresponding CSS file for each skin

(2) to define the corresponding tones of the individual skins corresponding to the selectors, for example (in the case of my encounter with this problem):

fieldset{    Background-color: #95b8e7}

Each skin is added with a set of corresponding styles.

This allows you to achieve the effect when you open the page rendering style.

Adapt to Web sites that contain different skins. Part Style method

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.