freeCodeCamp/guide/chinese/certifications/responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons/index.md

17 lines
713 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Create a Set of Radio Buttons
localeTitle: 创建一组单选按钮
---
## 创建一组单选按钮
要解决这一挑战,您可以将其分解为更好地理解步骤:
* 创建“容器”:放下两个`label`元素并向他们提供挑战所要求的文本内容(一个必须有“室内”文本,一个“室外”,大写字母);
* 创建'content':一个单选按钮,它只是一个`input`元素, `type=radio` (创建其中两个);
* 创建一_组_单选按钮将两个单选按钮的属性`name`设置为相同的值(挑战说明指出该组必须命名为`indoor-outdoor` ;
* 将每个单选按钮嵌套在标签中;
祝你好运!