Fieldset样式(Fieldset Styles)
优质
小牛编辑
131浏览
2023-12-01
描述 (Description)
Fieldset用于将相关元素组合在一起。 它可以通过使用.fieldset类在Foundation中实现。
例子 (Example)
以下示例演示了在Foundation中使用fieldset styles 。
<html>
<head>
<title>Form Fieldset Styles</title>
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
</head>
<body>
<fieldset class = "fieldset">
<legend>Select your favourite sport.</legend>
<input id = "football" type = "checkbox">
<label for = "football">Football</label>
<input id = "cricket" type = "checkbox">
<label for = "cricket">Cricket</label>
<input id = "baseball" type = "checkbox">
<label for = "baseball">Baseball</label>
<input id = "basketball" type = "checkbox">
<label for = "basketball">Basketball</label>
</fieldset>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>