As the title states, the input box increases after being clicked, mainly because the background image of the input box needs to undergo a sliding process when it increases.
You need to use jquery,
$('#输入框ID').click(function(){ $("#输入框ID").animate({ width: "200px", height: "50px", fontSize: "18px", borderWidth: "2px" }, 1000 );});//具体数值你根据你自己的要求来
The background image is the same
Need to use jquery,
JScript code
$('#Input box ID').click(function(){ $("#Input box ID").animate({ Width: "200px",
Height: "50px",
Fontsize: "18px",
BorderWidth: "2px"
}, 1000);
// The specific values are based on your own requirements...
That's right. . Generally CSS3 supports animation. . If it is not supported, it can only be written in JS. The above JS is available!
< ;html xmlns="http://www.w3.org/1999/xhtml">
var w = $("#search_input").width();
var h = $("#search_input" ).height();
$("#search_input").focus(function() {
var me = $(this);
var size = 5;
me.animate(
{
width : w size,
height : h size
}
);
}).blur(function() {
$(this).animate(
{
width : w,
height: h
}
);
});