MaterializeCSS multiple select not working

旧街凉风 提交于 2019-12-11 10:07:03

问题


I'm having trouble getting the Materialize CSS multiple select box to work.

I know about the javascript function material_select that needs to be called.

JSFiddle

Documentation

Any help appriciated, perhaps I'm just missing something.


回答1:


Did you included the script/stylesheet?

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/css/materialize.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/js/materialize.min.js"></script>

Working: https://jsfiddle.net/8kdo8ndb/3/




回答2:


Include following tag under <head> tag -

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.2/js/materialize.min.js"></script>

If you dont not waht to use CDN, You have make structure of files like -

MyWebsite/
  |--css/
  |  |--materialize.css
  |
  |--font/
  |  |--material-design-icons/
  |  |--roboto/
  |
  |--js/
  |  |--materialize.js
  |
  |--index.html


来源:https://stackoverflow.com/questions/33700603/materializecss-multiple-select-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!