1

IE 9 の contenteditable div 内にテキスト入力フィールドを追加しましたが、入力フィールドはサイズ変更可能で、周囲に境界線があります。これを CSS で修正しようとしましたが、機能しません。これが私のコードです:

HTML:

<body>
<div id="wrapper">     
    <div id="input" style="border:1px solid black;height:100px;" tabindex="0" onfocus="divFocus();" onblur="divBlur();">
        <p id="text" contenteditable="true">
        <input type="text" id="textBox" size="3" onblur="keydown(32);" onkeypress="this.style.width = ((this.value.length + 1) * 8) + 'px';" 
       value="Anything" />
        </p>
    </div>
</div>
</body>

CSS:

    #textBox
{
    text-wrap:normal;
    font-family:arial;
    font-size:15px;
    border:none;
    resize:none;
    border:0; 
    border-color: transparent;
}
#textBox:focus 
{
    outline: none;
    outline-width: 0;
    outline-color: transparent;
}
4

1 に答える 1