The Element UI style cannot be modified ., Elementui

Source: Internet
Author: User

The Element UI style cannot be modified ., Elementui

The Element UI component is very convenient to write recently in the project. However, after all, Element UI has its own default style, which is not required by the customer, however, I encountered a difficult problem when I wanted to modify the style.

Here we will not discuss how to introduce and use Element. There are many official documents and Baidu documents. Here we will mainly discuss the issue that the style mentioned in the question cannot be modified.

The Element official document provides the simplest paging component:

<Div class = "block"> <span class = "demonstration"> effects greater than 7 pages </span> <el-pagination layout = "prev, pager, next ": total = "1000"> </el-pagination> </div>

Of course, this is the default style of the Element. When you modify the style, such as the spacing and border between each number, the corresponding modification cannot be found in the debugger.

 

How can this problem be solved?

<style lang="scss" scoped>    @import "../../../../styles/home/proMessage.scss";</style>

The above code is used to introduce styles. We only need to delete the scoped attribute, or if scoped involves other styles, write another style label, modify the style of the Element component in the new style label.

<style lang="scss">    .el-pagination {            color: #333333;        }    </style><style lang="scss" scoped>    @import "../../../../styles/home/proMessage.scss";</style>

 

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.