简体   繁体   中英

CSS issue in Safari and IE

I have a input fixed to width:0 and border: 0 ready for css transition (Onclick expand to 75%) Everything works fine but in Safari and IE width is not 0. I can see a 2px (aprox.) width of this input field.

This is my CASS code:

input#s {
    width:0;        
    border:0px;
    text-align:center;
    font-family: Georgia, Serif;
    color: #999; 
    font-variant: small-caps;
    vertical-align:baseline;     
    -webkit-transition:width 0.7s ease-in-out;
    -moz-transition:width 0.7s ease-in-out;
    transition:width 0.7s ease-in-out;
} 

Anybody could help me? Maybe I have to fix with font-size:0; and :focus one set correct font-size ?

Try border: none 0; A known ie hack.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM