antd menu 样式修改

记录一下antd 中,table 样式修改, 方便大家快速使用基本上按照以下代码修改相应颜色即可// 设置菜单样式.ant-menu,.ant-menu-sub,.ant-menu-inline{ color: white; background-color: #044d50 !important;}// 设置子菜单展开样式.ant-menu-submenu > .ant-menu { background-color: rgb(16, 71, 83) !important;
摘要由CSDN通过智能技术生成

记录一下antd 中,table 样式修改, 方便大家快速使用
基本上按照以下代码修改相应颜色即可

// 设置菜单样式
.ant-menu,.ant-menu-sub,.ant-menu-inline{
  color: white;
  background-color: #044d50 !important;
}

// 设置子菜单展开样式
.ant-menu-submenu > .ant-menu {
  background-color: rgb(16, 71, 83) !important;
}
.ant-menu-submenu-title{
  color: white !important;
}
// 去掉右边框
.ant-menu-inline {
  border: none;
  margin: 0px;
}
// 设置 a 链接样式
.ant-menu-item a {
  color: white !important;
}
.ant-menu-item a:hover {
  color: #044d50 !important;
}
.ant-menu-item a:active:before {
  color: #044d50 !important;
}
.ant-menu-item a:active:after {
  color: #044d50 !important;
}
// 下拉箭头样式
.ant-menu-submenu-arrow {
  color: white !important;
}

// 菜单收缩样式
.ant-menu.ant-menu-inline-collapsed {
  width: 60px;
}
// 设置收缩后的右边框
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left {
  border-right: none;
}
// 气泡框样式
.ant-tooltip-inner,.ant-tooltip-arrow-content{
  background-color: rgb(16, 71, 83) !important;
}
.ant-tooltip-inner 
  • 16
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 11
    评论
修改antd上传进度条的样式,可以通过CSS来实现。首先,给上传组件的上传按钮添加一个类名,例如"upload-button"。 然后,在CSS中,使用这个类名来选中上传按钮,并修改样式。可以使用属性选择器,为该类名添加样式。例如,设置上传按钮为蓝色背景和白色文字颜色: .upload-button { background-color: blue; color: white; } 接下来,修改进度条的样式。通过查看antd的文档,可以找到进度条组件的类名。可以使用父子选择器,选中进度条组件并修改样式。例如,将进度条的高度设置为5px,背景色设置为绿色: .upload-button .ant-progress { height: 5px; background-color: green; } 可以根据需要,修改进度条的其他样式,例如边框颜色、动画效果等。 最后,在上传过程中,可以通过对进度条组件设置动态样式来显示上传进度。可以使用JavaScript代码来监听上传事件,并更新进度条的宽度。例如,使用百分比来表示上传进度: const uploadButton = document.querySelector(".upload-button"); const progressBar = document.querySelector(".ant-progress"); uploadButton.addEventListener("change", function(e) { const file = e.target.files[0]; const fileReader = new FileReader(); fileReader.onprogress = function(e) { const progress = Math.floor((e.loaded / e.total) * 100); progressBar.style.width = progress + "%"; }; fileReader.readAsDataURL(file); }); 以上是一种通过CSS和JavaScript来修改antd上传进度条样式的方法。根据具体需求和antd的版本,可能会有一些细微的差别,但整体思路是相似的。
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

咿呀咿呀哟~~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值