input的type为checkbox的样式的调整

采用的是若依框架,客户一定要在全选框的前面加个全选。这种boostrap表格,框架自带的东西,真是难死
他一定是个傻子
在这里插入图片描述首先我就简单的写了一些css样式,这种写法,我还是第一次尝试

		/*!*复选框样式*!*/
		input[type=checkbox] {
			margin-right: 10px;
			cursor: pointer;
			font-size: 14px;
			width: 15px;
			height: 15px;
			position: relative;}
		input[type=checkbox]:after {
			position: absolute;
			width: 15px;
			height: 15px;
			text-align:center;
			top: 0;
			content: "";
			color:  #ffffff ;
			display: inline-block;
			visibility: visible;
			padding: 0px 2px;
			border-radius: 3px;
			background:  #ffffff;
			border:1px solid #DDDDDD;
		}
		input[type=checkbox]:checked:after {
			content: "✓";
			color:  #000000  ;
			text-align:center;
			font-size: 12px;
			font-weight:600;
			background-color: #ffffff;
			border:1px solid #DDDDDD;
		}

然后就是怎么把“全选”。加在框后面,想来先去,用before,after都不完美。最后没办法了,自己就加了一列,效果还不错

{
                    field : '',
                    title : '全选',
                    align: 'left',
                    formatter: function(value, row, index) {
                        return '<div class="divstyle" style="width:10px;">' + "" + '</div>';
                    }
                },

累死了

发布了21 篇原创文章 · 获赞 0 · 访问量 191

猜你喜欢

转载自blog.csdn.net/qq_35315439/article/details/105143119
今日推荐