How to get button text to align top in IE?

2019-07-18 10:11发布

I have some text inside a button. I want this text to be aligned at the top of the button. By default it seems to be aligned to the middle. In webkit I can get this text to align top using -webkit-box-align: start; This doesn't seem to work for IE.

Example: http://jsfiddle.net/RY6dQ/

1条回答
The star\"
2楼-- · 2019-07-18 10:56

You could try following (example):

html:

<button><span>Text</span></button>​

css:

button {
     height: 100px;
}

button span{
    display: block;
    position: relative;
    top: -40px;

}
查看更多
登录 后发表回答