el-tabs style modification

question

Write two tab pages with the el-tables component, the initial code and effect are as follows:

<el-tabs type="border-card">
	<el-tab-pane>
		 <span slot="label">
		     <img src="../assets/images/machine.png" />机手
		 </span>
		我的行程
	</el-tab-pane>
	
	<el-tab-pane>
	     <span slot="label">
	        <img src="../assets/images/machine.png" /> 销售       
	     </span>
		我的行程
	</el-tab-pane>
</el-tabs>

The effect
insert image description here
style is too ugly

style modification

::v-deep .el-tabs--border-card{
    
    //修改整体背景色与边框为透明
		background-color: transparent;
		border-color: transparent;
		.el-tabs__header {
    
    //修改标签背景色为透明,并且没有下边横线
		    background-color: transparent;
		    margin: 0;
			border-bottom: 1px solid transparent;
			.el-tabs__nav {
    
    //将标签整体轮廓设为绿色
				border: 1px solid #80ffff;
				.el-tabs__item{
    
    //标签内容颜色为白色,并加粗,每个标签轮廓为绿色
					color: #ffffff;
					font-weight: bold;
					border-left: 1px solid #80ffff;
				}
				.el-tabs__item.is-active{
    
    //标签点击时,背景色变为蓝色,字体变为白色,左右上边框变绿色,
					background-color:#1B4584;
					color: #ffffff;
					border-right-color: #80ffff;
				    border-left-color: #80ffff;
					border-top-color:#80ffff ;
				}
			}
			
		}
	}

Effect
insert image description here

Guess you like

Origin blog.csdn.net/qq_43840793/article/details/125380405