网页制作中输入框的样子怎么改变??

html-css014

网页制作中输入框的样子怎么改变??,第1张

1、通过css+div进行输入框样式的调整

例如:

输入框景背景透明:

<input style="background:transparentborder:1px solid #ffffff">

鼠标划过输入框,输入框背景色变色:

<INPUT value="Type here" NAME="user_pass" TYPE="text" SIZE="29" onmouseover="this.style.borderColor='black'this.style.backgroundColor='plum'"

style="width: 106height: 21"

onmouseout="this.style.borderColor='black'this.style.backgroundColor='#ffffff'" style="border-width:1pxborder-color=black">

使用css样式直接可以改变input的样式的,input属于行内替换元素height/width/padding/margin均可用,效果等于块元素。

工具原料:编辑器、浏览器

1、设置一个宽度是宽度500px,高度50px,边框是红色的input输入框的代码如下:

<body>

<input type="text" />

<style>

input{

width: 500px

height: 50px

border: 1px solid red

}

</style>

</body>

2、运行的效果如下图:

<div id="mar">

<div style="float:left">

<label>1</label>

<input type="text" />

</div>

<div style="float:left">

<label>2</label><input type="text" />

</div>

<div style="float:left">

<label>3</label><input type="text" />

</div>

</div>

如果是外部CSS 自己分离吧