<style>
*Reset*
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*Changing the height of the body for better view*
body {
height: 1000px;
}
*Increasing the height and width of the div element*
div {
width: 100px;
height: 100px;
background-color: brown;
margin: auto;
margin-top: 100px;
}
*setting the height and width of the input to 100% of the div element*
input {
height: 100%;
width: 100%;
}
</style>
<body>
<div>
<input id="" name="" type="checkbox"/>
</div>
</body>
9 个回复
八刀丁二
赞同来自:
小姐请别说爱
赞同来自:
通过使用控制元素替换它,您将获得最大的灵活性 JavaScript 和 CSS. 使用标准 checkbox 作为备用选项。
如今在伪部门的帮助下
您还可以创建一个项目。
.
詹大官人
赞同来自:
石油百科
赞同来自:
使用标记
, 要单击任何其他元素还会启动标记 textbox.
做你自己的 checkbox 通过 Javascript, 切换图像并填写隐藏的输入字段。
冰洋
赞同来自:
风格是
代码 checkbox 是一个:
小姐请别说爱
赞同来自:
它与跨浏览器兼容,还将根据设备的分辨率调整大小。
诸葛浮云
赞同来自:
现在设置元素的高度和宽度 checkbox 在 100% 元素 div.
江南孤鹜
赞同来自:
知食
赞同来自: