簡體   English   中英

旋轉標簽 - 材質 UI 按鈕

[英]Rotate label - Material UI button

我有一個這樣的按鈕(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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM