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

Vue Getting Started with Weather Forecast

This article example shares the specific code of ...

MySQL reports an error: Can't find file: './mysql/plugin.frm' solution

Find the problem Recently, I found a problem at w...

Detailed steps for setting up host Nginx + Docker WordPress Mysql

environment Linux 3.10.0-693.el7.x86_64 Docker ve...

Detailed explanation of MYSQL log and backup and restore issues

This article shares MYSQL logs and backup and res...

How to implement communication between Docker containers

Scenario: A laradock development environment (php...

Vue scaffolding learning project creation method

1. What is scaffolding? 1. Vue CLI Vue CLI is a c...

Detailed explanation of Navicat's slow remote connection to MySQL

The final solution is in the last picture If you ...

MySQL 8.0.17 installation and configuration method graphic tutorial

This article shares the installation and configur...

How to configure path alias for react scaffolding

The react version when writing this article is 16...

Summary of HTML knowledge points for the front end (recommended)

1. HTML Overview htyper text markup language Hype...

HTML markup language - form

Click here to return to the 123WORDPRESS.COM HTML ...

js canvas realizes circular water animation

This article example shares the specific code of ...

Detailed explanation of commands to view linux files

How to view linux files Command to view file cont...