开发者

rounded textbox css

I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still see the rectangular shape of the textbox whenever you click inside it. What would be the fix for this? So that the highlight will go with the image with rounded corners

/* Rounded Corner */
.tb5 {
    background: url(images/rounded.gif) no-repea开发者_开发技巧t top left;
    height: 22px;
    width: 230px;
}
.tb5a {
    border: 0;
    width:220px;
    margin-top:3px;
}


This should only occur in some browsers such as Google Chrome, it is meant to help with usability and accessibility but it can cause issues with some styling. What you want to do is remove the dynamic outlines like this:

input[type="text"] { 
    outline: none;
} 

In addition, you can try highlighting the text box still by including a background image change using a psedo-selector like :focus

input[type="text"]:focus { 
    background: url(images/rounded-focused.gif) no-repeat top left;
} 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜