javascript - 旋转标签 - 材质 UI 按钮
问题描述
我有一个像这样的按钮(material-ui):
//theme.js
export const XButtonTop = withStyles({
root: {
borderColor: medium_col,
borderRadius: 1,
borderTopLeftRadius: 16,
borderTopRightRadius: 16,
height: 28
},
label: {
textTransform: "uppercase",
fontSize: "10px"
}
})(Button);
//App.js
import {
XButtonTop
} from "../theme";
const Selector = state => {
return (
<div>
<XButtonTop fullWidth size="small" disableElevation>
)
</XButtonTop>
</div>
)
}
我需要旋转标签(90 度)。
有人能帮助我吗?谢谢
解决方案
label: {
textTransform: 'capitalize',
transform: 'rotate(-90deg)',
}
然后你可能也想改变按钮的高度。像这样的根:
height: 120,
width: 30
推荐阅读
- php - 如何从我的网站跟踪通过 xpath 进行的查询?
- azure - 禁止 Azure AD 用户访问 Microsoft 服务
- git - git pull --rebase origin master 和 git pull --rebase origin test 有什么区别?
- django - Django objects.filter() 问题
- java - 如何在拨打电话时设置可选的 RequestBody 字段而不将其删除?
- javascript - Vue 3 - 组件出现时始终滚动到页面上的特定位置
- python - Python编码,出现错误:只能将str(不是“int”)连接到str
- spring - Spring Integration中的工作流建模问题
- scala - 如何在类型安全的配置文件中为 Spark 指定动态输入和输出路径?
- python - 递归打印s3中的子文件夹和子文件夹