【问题标题】:How can I create a currency convert in this?如何在此创建货币转换?
【发布时间】:2018-07-23 10:15:18
【问题描述】:

我被要求实施货币转换,如下所示的课程作业,这是我的问题:

  1. 红色矩形中的组件叫什么?是下拉菜单吗?但是这种双箭头格式是如何创建的呢?我搜索了引导下拉菜单,但它们没有提供这样的格式(双箭头下拉菜单),而且这个任务可能也不允许我们使用引导。

https://i.stack.imgur.com/or5BY.png

【问题讨论】:

    标签: html css frontend


    【解决方案1】:

    您应该使用来获取下拉菜单。这将只是 Windows 上的一个箭头。在 Mac 上,它将是双箭头。如果你想实现双箭头,你可以做这样的事情。

    body {
      background: #f2f2f2;
    }
     
    .selectdiv {
      position: relative;
      /*Don't really need this just for demo styling*/
      
      float: left;
      min-width: 200px;
      margin: 50px 33%;
    }
     
    /*To remove button from IE11, thank you Matt */
    select::-ms-expand {
         display: none;
    }
     
    .selectdiv:after {
      content: '<>';
      font: 17px "Consolas", monospace;
      color: #333;
      -webkit-transform: rotate(90deg);
      -moz-transform: rotate(90deg);
      -ms-transform: rotate(90deg);
      transform: rotate(90deg);
      right: 11px;
      /*Adjust for position however you want*/
      
      top: 18px;
      padding: 0 0 2px;
      border-bottom: 1px solid #999;
      /*left line */
      
      position: absolute;
      pointer-events: none;
    }
     
    .selectdiv select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      display: block;
      width: 100%;
      max-width: 320px;
      height: 50px;
      float: right;
      margin: 5px 0px;
      padding: 0px 24px;
      font-size: 16px;
      line-height: 1.75;
      color: #333;
      background-color: #ffffff;
      background-image: none;
      border: 1px solid #cccccc;
      -ms-word-break: normal;
      word-break: normal;
    }
     
    <div class="selectdiv">
      <label>
          <select>
              <option selected> Select Box </option>
              <option>Option 1</option>
              <option>Option 2</option>
              <option>Last long option</option>
          </select>
      </label>
    </div>

    Here 是另一个例子。

    【讨论】:

    • 非常感谢正常!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-02
    • 1970-01-01
    相关资源
    最近更新 更多