从左到右从右到左转换-输入



我已经写了一个代码,它的输出是[IWhat is]1,我希望它是[Iwhat should is]2我该怎么做?应该在哪里编辑?

我写了一个代码,它的输出是[什么是]1,我希望它是[应该是什么]2我该怎么做?应该在哪里编辑?

.prt-pricing-detial {
display: table;
text-align: right;
width: 100%;
margin-bottom: 25px;
}
.pricing-heading {
font-family: "Mr Eaves XL Modern", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-style: normal;
font-weight: normal;
line-height: normal;
font-size: 16px;
color: #000000;
vertical-align: middle;
display: table-cell;
}
.pricing-profit {
display: inline-block;
text-align: center;
height: 42px;
font-size: 18px;
width: 120px;
text-indent: 8px;
}
.prt-pricing-name {
text-align:center;
font-weight: 600;
font-size: 18px;
margin-bottom: 20px;
}

<div class="prt-pricing-content">
<div class="prt-pricing-name"><span></span></div>
<div class="prt-pricing-detial">
<span class="pricing-heading">سود شما:</span><div class="pricing-field">
<input class="pricing-profit" type="number" value="25.00" disabled="">

使用CSSdirection:rtl

.row-reverse {
direction: rtl;
}

Direction属性指定块级元素内的文本方向/写入方向
Direction具有4值

direction: ltr|rtl|initial|inherit;

所以我只给这个问题2

  • ltr=文本方向从左向右-默认
  • rtl=文本方向从右向左

将得到这样的输出

.row-reverse {

direction: rtl;
}
.prt-pricing-detial {
display: table;
text-align: right;
width: 100%;
margin-bottom: 25px;
}
.pricing-heading {
font-family: "Mr Eaves XL Modern", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-style: normal;
font-weight: normal;
line-height: normal;
font-size: 16px;
color: #000000;
vertical-align: middle;
display: table-cell;
}
.pricing-profit {
display: inline-block;
text-align: center;
height: 42px;
font-size: 18px;
width: 120px;
text-indent: 8px;
}
.prt-pricing-name {
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 20px;
}
<div class="prt-pricing-content row-reverse">
<div class="prt-pricing-name"><span></span></div>
<div class="prt-pricing-detial">
<span class="pricing-heading">سود شما:</span>
<div class="pricing-field">
<input class="pricing-profit" type="number" value="25.00" disabled="">

最新更新