聚合物纸 - 滑块不可拖动

时间:2015-01-21 10:47:31

标签: html css slider polymer

我在我的应用程序中使用聚合物纸张滑块,但是它总是卡在初始位置并且不会拖动用户操作。进度条也不可见。现在看起来如下:

enter image description here

我正在使用以下代码:

<!doctype html>
<html>

<head>

  <title>Page 2</title>

  <meta name="viewport" 
  content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

  <script src="../components/webcomponentsjs/webcomponents.js">
  </script>

  <link rel="import" href="../components/font-roboto/roboto.html">
  <link rel="import"
    href="../components/core-header-panel/core-header-panel.html">
  <link rel="import"
    href="../components/core-toolbar/core-toolbar.html">
  <link rel="import"
    href="../components/paper-tabs/paper-tabs.html">
  <link rel="import" href="post-card.html">
  <link rel="import" href="components/paper-button/paper-button.html">
  <link rel="import" href="components/paper-slider/paper-slider.html">


  <style shim-shadowdom>
  html,body {
    height: 100%;
    margin: 0;
    background-color: #E5E5E5;
    font-family: 'RobotoDraft', sans-serif;
  }
  core-header-panel {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch; 
  }
  paper-slider{
    width:800px;
  }

  core-toolbar {
    background: #03a9f4;
    color: white;
  }
      section {
      padding: 20px 0;
    }

    section > div {
      padding: 14px;
      font-size: 16px;
    }

  #tabs {
    width: 100%;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-transform: uppercase;
  }
  .container {
    width: 80%;
    margin: 50px auto;
  }
  paper-button[raised].colored {
    background: #03a9f4;
    color: white;
    margin-top: 30px;
    text-align: center;
    vertical-align: middle; 
    }


    .slider-markers, #sliderBar, #sliderKnob {
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
    paper-slider::shadow #sliderKnobInner
    {
      background-color: #0f9d58;
    }
    paper-slider::shadow #sliderKnobInner::before
    {
        background-color: #0f9d58;
    }
    paper-slider::shadow #sliderBar::shadow #activeProgress {
      background-color: #0f9d58;
    }





  @media (min-width: 481px) {
    #tabs {
      width: 200px;
    }
    .container {
      width: 400px;
    }
  }
  </style>

</head>

<body fullbleed vertical layout unresolved>

  <core-header-panel flex mode="normal">

    <core-toolbar>
<span flex>Flow</span>
    </core-toolbar>

    <div class="container" layout vertical center>

      <post-card>
        <img width="70" height="70" 
        src="../images/venturimeter.jpg">
        <h2>Venturimeter</h2>
        <br/>        
          <div>In order to</div>
          <br/><br/>
    <paper-slider pin value="50"></paper-slider>
      <br/><br/>
      </post-card>

      <paper-button span raised class="colored" onclick="window.open('Page3.html','_parent');" layout center horizontal>Next</paper-button>




  </core-header-panel>
</body>

</html>

我在这里犯的错误是什么?我该如何解决这个问题?

谢谢!

0 个答案:

没有答案