文本对齐方式不适用于Safari浏览器< select> [英] text-align is not working on safari <select>
本文介绍了文本对齐方式不适用于Safari浏览器< select>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将<select>
元素中的文本在野生动物园中向右或居中对齐.但是没有任何效果. text-align:center;
在除safari外的所有浏览器中均可使用. direction:rtl;
和dir="rtl"
没有执行任何操作.该列表始终在Safari中向左对齐. -webkit-appearance: none;
也无济于事.请给我一个解决方法.
解决方案
对于Safari
text-align: -webkit-center;
但是,分析HTML/CSS的最佳方法是Safari中的Web检查器.
更多>> >
I have tried aligning the text in the <select>
element to the right or the center in safari. But nothing worked. text-align:center;
worked in all browsers except safari. direction:rtl;
and dir="rtl"
did not do anything. the list is always align to the left in Safari. -webkit-appearance: none;
does not help either. Please I need a solution.
解决方案
For Safari
text-align: -webkit-center;
However, the best way to analyze the working of HTML/CSS is the Web-Inspector in Safari.
这篇关于文本对齐方式不适用于Safari浏览器< select>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文