Open zhengwei1949 opened 5 years ago
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> *{ margin:0; box-sizing: border-box; padding:0; } .num{ font-size:0; } span{ display:inline-block; width:28px; height:28px; line-height: 24px; text-align: center; border:1px solid black; vertical-align: middle; font-size:14px; } input{ width:28px; height: 28px; vertical-align: middle; font-size:14px; text-align: center; border:1px solid black; border-left:none; border-right:none; } </style> </head> <body> <div class="num"> <span>-</span> <input type="text" value="1"> <span>+</span> </div> </body> </html>