鍍金池/ 問答/HTML/ input 邊框問題

input 邊框問題

  不應(yīng)該是剛好相等嗎?怎么會(huì)被擠出去?是哪里出了問題???求大神解答/期待的小眼神
clipboard.png

    #box{//外邊框
        border: 5px solid #d00;
        width: 200px;
        height: 40px;
    }
    input{
        outline: none;
        padding: 0;
        border: 0 none;
    }
    input:nth-child(1){//輸入框
        width: 150px;
        height: 40px;
    }
    input:nth-child(2){//按鈕
        width: 50px;
        height: 40px;
    }
    #big{//背景
        width: 400px;
        height: 200px;
        background: #000;
    }

html

    <div id="big">
        <div id="box">
            <input type="text">
            <input type="button" value="測試">
        </div>
    </div>
回答
編輯回答
淡墨

把你的html改成這樣

<div id="big">
        <div id="box">
            <input type="text"><input type="button" value="測試">
        </div>
    </div>
2017年12月30日 09:47