复选框不适用于materializecss-HTML,CSS [英] Checkbox not working with materializecss - HTML, CSS

查看:80
本文介绍了复选框不适用于materializecss-HTML,CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用materializecss时,我似乎无法使用复选框,因为其他人遇到了此问题并设法解决了该问题?

I can't seem to get checkbox to work whilst using the materializecss, as anyone else came cross this issue and managed to fix it?

我正在使用的图书馆:

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

不带库的复选框- https://jsfiddle.net/d2yk4sbv/2/

     <div><label> <input type=checkbox> label 1 </label></div>

带库的复选框- https://jsfiddle.net/d2yk4sbv/

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
            <div><label> <input type=checkbox> label 1 </label></div>

如果没有该库,该复选框似乎可以正常工作,但是问题是,我的应用程序依赖于使用materializecss,所以我不能不使用它:(

The checkbox seems to be working fine without the library but the problem is, my application depends on using the materializecss so I can't afford to not use it :(

链接到materializecss网站- http://materializecss.com/

Link to the materializecss website - http://materializecss.com/

推荐答案

开始工作.似乎您需要在标签和输入检查之间建立关系.你为什么不这样尝试

To be work. It seems like you need to put a relation between the label and the input check. Why don't you try in this way

<div>
  <input type="checkbox" id="check">
  <label for="check">label 1</label>
</div>

http://materializecss.com/forms.html#checkbox

这篇关于复选框不适用于materializecss-HTML,CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆