Software testing basic learning -CSS

1. radio button

<input type="radio" name="xb" id="nan" checked="checked"/> <label for="nan">男</label>

Note: Add the name attribute to achieve the effect of radio

    M is selected from the tag label added to achieve a radio effect can be achieved, provided that the same radio button id attribute value of the attribute for the corresponding

    Set the default selected, give the radio button to add a checked = "checked" attribute

2. The drop-down menu

<select name="">

  <Optgroup label = "Heshan">

    <Option> Shaping </ option>

    <option selected="selected">古劳</option>

  </optgroup>

</select>

selected = "selected" state is selected by default

3. Text Field

<textarea width='' " height=" " placeholder=""></textarea >

Note cols rows can not be used to set the width and height, use the width, height set placeholder text set reminders

4. checkbox

<input type="checkbox">

Setting consistent with single-box

5. Button

<Input type = "reset"> reset button

<Input type = "sumbit"> submit button

Set the autofocus = "autofocus" setting the first text box, checked by default

6.css basic grammar

Placed between the head tags

<style type="text/css">

Tag selector p {Text-indent: 2em;}

id selector #id name

.Class class selector names (often, can be reused, and may be added more than one style)

Right selector weight selector id> class selector> tag selector

</style>

<Div> </ div> large container (which can be displayed on one line)

 <Span> </ span> small container (can be displayed on one line)

7.css manner of introduction

Embedded electricity supplier must Home

Use outer chain <link /> (tag) to achieve code-

Inline style

 

Guess you like

Origin www.cnblogs.com/1617-fung/p/11331949.html