Perfectly solves the problem of incorrect select drop-down box options in iview.

Source: Internet
Author: User

Perfectly solves the problem of incorrect select drop-down box options in iview.

When using iview, I encountered such a problem by using the select drop-down box component in the Model. But when the pop-up box needs to scroll more than one screen, the select drop-down options will be misplaced (1 is normal, and figure 2 is rolling, the drop-down options are misplaced .)

Figure 1:

Figure 2:

After the component code is analyzed, the following style is found:

. Ivu-modal. ivu-select-dropdown {position: absolute! Important ;}

Solution

This style affects the positioning of the drop-down box. The solution is to overwrite the original style of the author.

However, unfortunately, the author adds one! Important, changed the priority.

So, how to make your style priority higher than him, you can add such a style in the Custom style file:

Body. ivu-modal. ivu-select-dropdown {position: fixed! Important ;}

This solves the problems mentioned above. For more information about how to add a body to change the style priority, see my blog article (how2js.cn)

The above Article perfectly solves the problem that the select drop-down box option of iview is misaligned. It is all the content shared by the editor. I hope you can give us a reference and support the help house.

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.