Home  >  Article  >  Web Front-end  >  What should I do if the vue style does not take effect?

What should I do if the vue style does not take effect?

coldplay.xixi
coldplay.xixiOriginal
2020-12-23 10:20:538559browse

Solution to the problem that vue styles do not take effect: If you want some styles to take effect on sub-components, you can use the [/deep/] depth selector, the code is [/deep/.my-table td .cell { white-space: pre;}].

What should I do if the vue style does not take effect?

The operating environment of this tutorial: Windows 7 system, Vue version 2.9.6, Dell G3 computer. This method is suitable for all brands of computers.

[Related article recommendations: vue.js]

Solution to vue style not taking effect:

/deep/ Depth Selector

In the vue component, when the style is set to scoped, the style sometimes does not take effect on the sub-component. If you want certain styles to apply to child components, you can use the /deep/ depth selector.

Code:

What should I do if the vue style does not take effect?

Parsed in browser:

What should I do if the vue style does not take effect?

Related Free learning recommendations: javascript (video)

The above is the detailed content of What should I do if the vue style does not take effect?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn