Home  >  Article  >  Web Front-end  >  border, select, fixed in html

border, select, fixed in html

不言
不言Original
2018-04-26 17:06:462713browse

This article mainly introduces the border, select, and fixed in dynamically generated HTML. It has certain reference value. Now I share it with you. Friends in need can refer to

Border in HTML

Only the border-radius of a certain corner


border-top-left-radius: 8px; upper left corner arc 8px;
border-top- right-radius: 8px; upper right corner
border-bottom-left-radius: 8px; lower left corner
border-bottom-right-radius: 8px; lower right corner

html select statement

1. Usage method

<select name="site">
    <option value="0">zero</option>
    <option value="1">one</option>
    <option value="2">two</option>
    <option value="3">three</option>
    <option value="4">four</option>
    <option value="5">five</option>
</select>

2. Add default selection

一般默认选中第一个选项,也可以手动添加选中状态,即在对应的option中添加selected="selected"

<select name="site">
    <option value="0">zero</option>
    <option value="1">one</option>
    <option value="2">two</option>
    <option value="3">three</option>
    <option value="4">four</option>
    <option value="5" selected="selected">five</option>
</select>

fixed and z-index

1. Explanation

  • fixed is a type of positioning in html, which means it is suspended above the document flow

  • absolute is absolute positioning in html, which means relative to the previous positioned element Absolute position, out of the document flow

  • relative is relative positioning in HTML, which means the relative position relative to the upper level positioning element, not out of the document flow

  • z-index is the priority, the priority of positioning, regardless of absolute/relative/fixed.

2. Usage scenarios

  • When you want to click a button, the entire screen will be covered with a black mask, and a box will be displayed on top of the black mask. At this time, you can set their z-index value and positioning type

Related recommendations:

About code comments in HTML

What are the techniques for using scroll bars in HTML

Meta setting methods in HTML

The above is the detailed content of border, select, fixed in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn