這種效果應(yīng)該怎么設(shè)置呢,我做出來的是這樣的,選框和文字不能對齊,顏色也不對。并且感覺人家要求應(yīng)該是單選框,但是單選框是圓形的,更不一樣了。我是這樣寫的:<span>產(chǎn)品搜索</span> <form method="post" action=""> <input type='checkbox' name="title"value='title'> <label name='title'>按題目</label> <input type='checkbox' name="title"value='content'> <label name='content'>按內(nèi)容</label> <input type='text' class="search_box"> <input type='button' name='search' value='搜索'> </div>#search form{ float:left; margin-left: 5px;}#search form label{ color: #fff;}input[type="checkbox"]{ margin: 7px 0px 0px 15px;}input[type='text']{ width:186px; height: 20px; margin-right: 15px; padding:0 5px;}input[type='button']{ color: red; padding:3px 13px; background-color: #fff;}
1 回答

緋紅卷千紅
TA貢獻(xiàn)6條經(jīng)驗 獲得超1個贊
可以使用-webkit-appearance: checkbox; 來將單選框radio顯示為checkbox的樣式,其實你精心調(diào)試的高度換個瀏覽器甚至在同瀏覽器的不同版本中也可能會渲染出不同的效果,input標(biāo)簽已經(jīng)高度組件化,沒有必要嘗試重新開發(fā)
添加回答
舉報
0/150
提交
取消