jQuery+CSS3网页表单元素美化

 时间:2026-02-16 10:55:25

1、准备好需要用到的SVG图标。

jQuery+CSS3网页表单元素美化

2、新建html文档。

jQuery+CSS3网页表单元素美化

3、书写hmtl代码。

<div class="zzsc-container">

  <header class="zzsc-header bgcolor-11">

    <h1>jQuery和CSS3超炫联系方式表单美化插件</h1>

  </header>

  <form class="cd-form floating-labels">

    <fieldset>

      <legend>Account Info</legend>

      <div class="error-message">

        Please enter a valid email address

      </div>

      <div class="icon">

        <label class="cd-label" for="cd-name">Name</label>

        <input class="user" type="text" name="cd-name" id="cd-name" required>

      </div>

      <div class="icon">

        <label class="cd-label" for="cd-company">Company</label>

        <input class="company" type="text" name="cd-company" id="cd-company">

      </div>

      <div class="icon">

        <label class="cd-label" for="cd-email">Email</label>

        <input class="email error" type="email" name="cd-email" id="cd-email" required>

      </div>

    </fieldset>

    <fieldset>

      <legend>Project Info</legend>

      <div>

        <h4>Budget</h4>

        <p class="cd-select icon">

          <select class="budget">

            <option value="0">Select Budget</option>

            <option value="1">&lt; $5000</option>

            <option value="2">$5000 - $10000</option>

            <option value="3">&gt; $10000</option>

          </select>

       

      </div>

jQuery+CSS3网页表单元素美化

4、书写css代码。

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, main { display: block; }

body { line-height: 1; }

ol, ul { list-style: none; }

blockquote, q { quotes: none; }

blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }

table { border-collapse: collapse; border-spacing: 0; }

jQuery+CSS3网页表单元素美化

5、代码整体结构。

jQuery+CSS3网页表单元素美化

6、查看效果。

jQuery+CSS3网页表单元素美化

  • 秋季如何养护樱花树
  • 氙灯老化试验箱M61故障维修案例
  • 春苗网怎么注册
  • 干锅手撕牛心菜
  • 和大家分享青春痘严重者的治疗的方法
  • 热门搜索
    台湾旅游攻略自由行 珠海东澳岛旅游攻略 冰岛旅游价格 途牛网旅游网 防城港旅游景点 旅游团网 青藏高原旅游 平安旅游险 赤峰旅游网 合肥旅游地图