溫馨提示×

html的搜索框代碼怎么寫

木子
4077
2021-05-12 18:05:10
欄目: 編程語言

html的搜索框代碼:1、在dw中創建一個input框和button按鈕。2、分別為input框和button按鈕設置樣式即可。


html的搜索框代碼怎么寫


1、在dw中創建一個input框和button按鈕,將它們擺放在同一排,代碼如下:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>demo</title>

</head>

<body>

<input type="" name="" id="" value="" /><button>搜索</button>

</body>

</html>

2、首先為input框添加“#7FCC0B”顏色的邊框,并設置寬度和高度,再給button按鈕設置白色的字體和“#7FCC0B”的背景顏色即可,代碼如下:

<style type="text/css">

input{

width: 180px;

height: 30pox;

border:1px solid #7FCCOB;

border-right: none;

border-radius: 4px;

}

button {

position: relative;

right: 2px;

width: 50px;

height: 35px;

font-size: 14px;

color: white;

backgrounf: #7FCC0B;

border: 0;

border-radius: 4px;

</style>

</head>



0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女