【问题标题】:Change the position of text in HTML更改 HTML 中文本的位置
【发布时间】:2022-06-30 14:36:55
【问题描述】:

以下是我运行良好的 HTML 代码。 只是我需要在这里更改文本的位置。 基本上,我写了一个像“左上角”这样的文本,这意味着它应该显示在按钮的左上角等等。有人可以帮我吗?

<!DOCTYPE html>
<html>

<head>
  <style>
    .new {
      color: black;
    }

    .act_button {
      height: 20vh;
      width: 20vh;
      background-color: #ADD8E6;
      border: none;
      color: white;
      padding: 15px 32px;
      text-align: center;
      text-decoration: none;
      font-size: 16px;
      margin: 4px 2px;
      cursor: pointer;
    }
  </style>
</head>

<body>
  <button class="btn btn-default action-button act_button" id="show" type="button">
    <div class="new">Top-left Top Right Bottom left Bottom right<div>
  </button>
</body>

</html>

【问题讨论】:

    标签: html css


    【解决方案1】:
    .act_button {
    height: 40vh;
    width: 60vh;
    background-color: #ADD8E6;
    border: none;
    color: white;
    padding: 0px 0px;
    text-decoration: none;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    text-align: left;
    

    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-05
      • 1970-01-01
      • 1970-01-01
      • 2021-07-16
      • 2012-12-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多