【问题标题】:webkit scrollbar css unsupported by ie [duplicate]ie不支持webkit滚动条css [重复]
【发布时间】:2019-02-14 18:07:57
【问题描述】:

对于样式滚动条(ul),我使用了 css。 .requestTypeul 的类。

我使用的css是 -

.requestType{
height:600px;  overflow-y: scroll; }    

.requestType::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #F5F5F5; }

.requestType::-webkit-scrollbar { width: 5px;   background-color: #F5F5F5; }

.requestType::-webkit-scrollbar-thumb{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: darkgray;   }

.list-group {
    display: flow-root; }

它在 chrome 中运行良好。

但在 IEmozilla firefox 的情况下,它会应用简单的滚动条而不对其进行样式设置。

对于IEmozilla firefox 中的滚动条样式,我应该怎么做。

 <ul class="list-group mb-3 requestType" id="requestType">

            <li class="list-group-item d-flex justify-content-between bg-light">
              <div class="text-success">
                <label class="Request_type" for="radio4">abc
                  <input type="radio" name="radio" value="abc" id="radio4">
                  <span class="checkmark"></span>
                  <h5><small class="text-muted">Brief description</small></h5>
                </label>
              </div>

            </li>

            <li class="list-group-item d-flex justify-content-between bg-light">
              <div class="text-success">

                <label class="Request_type" for="radio6">xyz
                  <input type="radio" name="radio" value="xyz" id="radio6">
                  <span class="checkmark"></span>
                  <h5><small class="text-muted">Brief description</small></h5>
                </label>
              </div>

            </li>

【问题讨论】:

  • 首先离开 IE,它不支持大多数当前的技术,因为微软已经贬低了它。
  • 请分享您使用的html

标签: html css twitter-bootstrap


【解决方案1】:

欢迎来到 UX 和 UI 的世界!浏览器支持矩阵非常适合此类问题,您可以使用它们来定义当您的应用程序在不同的浏览器或设备(例如iPad、手机等

您可以为视图提供 else 语句,然后如果用户在 chrome 中查看站点,则显示某个视图,而在 IE 中显示另一个视图。这可能是您的一个选择。

或者,您可以生成与所有浏览器兼容的样式表 - 这是与 IE 不兼容的 CSS 属性的快速列表https://www.impressivewebs.com/10-useful-css-properties-not-supported-by-internet-explorer/

希望这会有所帮助!

【讨论】:

    【解决方案2】:

    IE 和Moziila 只是不支持它。拥有一个很酷的滚动条的方法是使用一个库,你可以查找一些基于 jquery 的插件或 npm 包,如perfect-scrollbar。另一种方法是使用 vanilla js 和一些 css 从头开始​​(请记住,所有涉及动作的滚动都是很费力的)。

    【讨论】:

      猜你喜欢
      • 2011-11-05
      • 2013-02-28
      • 1970-01-01
      • 2021-12-07
      • 2014-11-22
      • 2011-04-17
      • 2012-05-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多