Home  >  Article  >  Web Front-end  >  How to solve the problem that the layui code modifier does not display the style

How to solve the problem that the layui code modifier does not display the style

王林
王林forward
2020-12-28 10:57:022473browse

How to solve the problem that the layui code modifier does not display the style

Introduction:

layui code modifier official documentation:

https://www.layui.com/doc/modules/code. html

(Learning video sharing: Programming video)

As a lightweight front-end framework, layui is quite easy to use for non-professional front-ends like us. But I encountered a problem when using the code decorator, and it became like this:

How to solve the problem that the layui code modifier does not display the style

It should have looked like this, with a title and a serial number.

How to solve the problem that the layui code modifier does not display the style

The familiar styles are not loaded in. Some plug-ins in the lay series need to load dependent modules, similar to:

How to solve the problem that the layui code modifier does not display the style

So I stared, it was indeed written, why didn’t it take effect? ​​I looked at the official document carefully:

How to solve the problem that the layui code modifier does not display the style

That is It is said that the style of code decorator is determined by code. And my decorator is generated dynamically after clicking on the panel to expand, so I should render the code decorator inside my panel after expanding the panel, like this

How to solve the problem that the layui code modifier does not display the style

In short, If your xxx style does not take effect:

1. Is the dependent module loaded successfully?
2. Is it rendered correctly?
3. One more thing, layuicode is determined by looking for the layui-code class by default. Looking for goals. So remember to mark the layui-code class

Related recommendations: layui tutorial

The above is the detailed content of How to solve the problem that the layui code modifier does not display the style. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete