Home > Article > Web Front-end > What should I do if the vue style does not take effect?
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;}].
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:
Parsed in browser:
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!