Solution to elementui's el-popover style modification not taking effect

Solution to elementui's el-popover style modification not taking effect

When using element-ui, there is a commonly used component, that is el-popover, but the style and usage in the element-ui official document are relatively limited, and the style needs to be changed when using it

I used el-popover in my project, but I have not been able to modify the style. Let's take a look at what the official documentation says.

insert image description here

Add a class name, string type, ok, add one

<el-popover
    placement="right"
    width="400"
    trigger="hover"
    popper-class="my-popover"
    >

To set the style

<style lang="scss" scoped>
	.my-popover{
		padding:20px;
	}
</style>

insert image description here

The result is that the setting was not successful!
Is it because of scope? Try again without scope!

<style>
my-popover{
    padding:10px 30px;
}
</style>

insert image description here

Still no effect! ! !
After crazy experiments and searching online!
The final writing method is this: .el-popover.my-popover, with the prefix .el-popover, otherwise it will not take effect. And can not be scoped

<style>
.el-popover.my-popover{
    padding:10px 30px;
}
</style>

insert image description here

Modification successful!

This is the end of this article about the solution to the problem that the modified style of elementui's el-popover does not take effect. For more related content about el-popover style not taking effect, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Example of using Element Popover

<<:  How to set up swap partition SWAP in Linux 7.7

>>:  Complete steps to install MySQL 8.0.x on Linux

Recommend

How to deploy Go web applications using Docker

Table of contents Why do we need Docker? Docker d...

Query the data of the day before the current time interval in MySQL

1. Background In actual projects, we will encount...

Linux file systems explained: ext4 and beyond

Today I will take you through the history of ext4...

XHTML 1.0 Reference

Arrange by functionNN : Indicates which earlier ve...

How to insert pictures into HTML pages and add map index examples

1. Image formats supported on the WEB: GIF: can s...

Solution to Docker image downloading too slowly

Docker image download is stuck or too slow I sear...

Detailed explanation of MySql data type tutorial examples

Table of contents 1. Brief Overview 2. Detailed e...

Analysis and application of irregular picture waterfall flow principle

The layout problem of irregular picture walls enc...

Two ways to clear table data in MySQL and their differences

There are two ways to delete data in MySQL: Trunc...

Examples of vertical grid and progressive line spacing

New Questions Come and go in a hurry. It has been...

Detailed steps to configure MySQL remote connection under Alibaba Cloud

Preface As we all know, by default, the MySQL ins...

Examples and comparison of 3 methods for deduplication of JS object arrays

Table of contents 1. Comparison of data before an...

How to change the color of the entire row (tr) when the mouse stops in HTML

Use pure CSS to change the background color of a ...