【发布时间】:2018-04-16 18:51:27
【问题描述】:
我正在尝试在 html/css 中呈现一行转换后的文本,但是我遇到了一些问题。当我缩放 Y 方向时,元素的整体对齐方式会像这张图片一样发生变化。
尝试将 L 旋转 180 度会导致相同的错误。如何保持文本在 y 缩放轴上的垂直对齐?假设我也使用小型大写字母进行此操作,您的解决方案有什么变化吗?
这里出了什么问题?
<style type="text/css" media="screen">
#reflect{
display: flex;
flex-basis: auto;
}
#reflectl {
/*transform: scaleX(-1) !important;*/
transform: scale3d(-1,-1, 1); !important;
}
#reflecte {
transform: scaleX(-1) !important;
}
#reflectc {
transform: scaleX(-1) !important;
}
</style>
<text id=reflect>
<text id="reflectref">REF</text>
<text id="reflectl">L</text>
<text id="reflecte">E</text>
<text id="reflectc">C</text>
<text id="reflectt" >T</text>
</text>
【问题讨论】:
标签: html css css-transforms text-alignment