8.23. Foundation form

发布时间 :2025-10-25 12:24:38 UTC      

The Foundation form control is automatically set to the global style:

所有 <textarea> , <select> <input> 元素宽度都为 100%,且带有外边距、内边距、阴影和鼠标移动效果。

8.23.1. Example

<form>
  Input:
  <input type="text" placeholder="Name">
  Textarea:
  <textarea rows="4" placeholder="Address"></textarea>
  Select:
  <select>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
  </select>
</form>

尝试一下 »

Label

Use in a form <label> Element to set the tag, which can add a for attribute and an id attribute. The user gets the focus of the input box when clicking on the label or input field:

8.23.2. Example

<form>
  <label for="name">Input
    <input type="text" placeholder="Name" id="name">
  </label>
  <label for="adr">Label
    <textarea rows="4" placeholder="Address" id="adr"></textarea>
  </label>
  <label for="num">Select
    <select id="num">
      <option>1</option>
      <option>2</option>
      <option>3</option>
      <option>4</option>
    </select>
  </label>
</form>

尝试一下 »

If you need to set the right alignment of labels, you can use the .right Class:

8.23.3. Example

<label class="right">

尝试一下 »

8.23.4. Fieldset

Foundation 渲染 ``<fieldset>`` 元素的样式如下:

8.23.5. Example

<form>
  <fieldset>
    <legend>Fieldset Legend</legend>
    <label>Name
      <input type="text" placeholder="First Name..">
    </label>
    <label>Email
      <input type="text" placeholder="Enter email..">
    </label>
  </fieldset>
</form>

尝试一下 »

Error statu

Use .error Class to set the wrong label, input box, and text box style

8.23.6. Example

<form>
  <label class="error">Error
    <input type="text" placeholder="Name..">
  </label>
  <small class="error">Wrong input</small>
  <textarea rows="4" placeholder="Address"></textarea>
  <small class="error">Wrong input</small>
</form>

尝试一下 »

注意 You need to use JavaScript to update the error status entered by the user.

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.