" tag; and finally define the pop-up layer's "layer.open()" method in the skin parameter. You can modify the popup layer button color by calling css style."/> " tag; and finally define the pop-up layer's "layer.open()" method in the skin parameter. You can modify the popup layer button color by calling css style.">

Home  >  Article  >  Web Front-end  >  How to modify the color of the popup layer button in layui

How to modify the color of the popup layer button in layui

藏色散人
藏色散人Original
2020-12-04 09:26:464389browse

layui method to modify the color of the pop-up layer button: first open the corresponding code file; then set the pop-up layer button style in the page "c9ccee2e6ea535a969eb3f532ad9fe89" tag; finally define the pop-up layer in the "layer.open( )" method's skin parameter to modify the popup layer button color by calling the css style.

How to modify the color of the popup layer button in layui

The operating environment of this tutorial: Windows 7 system, layui version 2.4. This method is suitable for all brands of computers.

Recommended: "javascript basic tutorial""layUI tutorial"

How to set the popup layer button in layui:

layer.open({
  skin: 'demo-class',
  content: '确认提交?',
  btn: ["取消", "确认"],
  yes: function (index) {
    layer.close(index)
  },
  btn2: function (index) {
    somefunciton...
  }
});
 
//在页面style中定义按钮css样式
<style>
 body .demo-class .layui-layer-btn0{
  border-color: #E6E3E6;
  background-color: #FFF;
  color: black;
 }
 body .demo-class .layui-layer-btn1{
  border-color: #4898d5;
  background-color: #2e8ded;
  color: #fff;
 }
</style>

Set the popup layer button style in the pagec9ccee2e6ea535a969eb3f532ad9fe89 tag, and then call the css style in the skin parameter of the layer.open() method that defines the popup layer to modify the popup layer button color.

The above is the detailed content of How to modify the color of the popup layer button in layui. 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