按钮上的zIndex -1使按钮不可单击

时间:2019-01-23 11:33:28

标签: css reactjs button material-ui z-index

我要使按钮可点击。

enter image description here

这是沙箱。 https://codesandbox.io/s/m5w3y76mvy

1 个答案:

答案 0 :(得分:0)

为数字添加圆圈  position: relative; z-index: 1;

并将mytasks z-index设置为0 zIndex: "0",我认为它会起作用。

检查整体风格

    mytasks: {
    color: "white",
    borderColor: "#2D9CDB",
    backgroundColor: "#2D9CDB",
    borderTopRightRadius: "18px",
    borderBottomRightRadius: "18px",
    borderTopLeftRadius: "18px",
    borderBottomLeftRadius: "18px",
    width: "200px",
    marginLeft: "-35px",
    zIndex: "0" /* changed to 0 */
  },
  numberCircle: {
    borderRadius: "50%",
    behavior: "url(PIE.htc)" /* remove if you don't care about IE8 */,
    width: "15px",
    height: "15px",
    padding: "8px",
    background: "white",
    border: "2px solid #2D9CDB",
    color: "#2D9CDB",
    textAlign: "center",
    font: "16px Arial, sans-serif",
    float: "left",
    zIndex: "1",/* added */
    position: "relative"/* added */
  }