提交 b2e9615d 编写于 作者: W wangshuainan

新增dir属性相关示例

Signed-off-by: Nwangshuainan <wangshuainan1@huawei.com>
上级 4b59e16b
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
## 示例 ## 示例
### 示例1
```html ```html
<!-- xxx.hml --> <!-- xxx.hml -->
<div id="container"> <div id="container">
...@@ -75,7 +77,7 @@ ...@@ -75,7 +77,7 @@
``` ```
```js ```js
/* xxx.js */ // xxx.js
export default { export default {
data: { data: {
visible: true, visible: true,
...@@ -99,4 +101,42 @@ export default { ...@@ -99,4 +101,42 @@ export default {
} }
``` ```
![zh-cn-attributes](figures/zh-cn-attributes.gif) ![zh-cn-attributes](figures/zh-cn-attributes.gif)
\ No newline at end of file
### 示例2
```html
<!-- xxx.hml -->
<div class="container">
<div>
<text class="text1" dir='rtl' >hello world</text>
</div>
<div>
<text class="text2" dir='ltr' >hello world</text>
</div>
</div>
```
```css
/* xxx.css */
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.text1{
width: 90%;
height: 100px;
background-color: aqua;
}
.text2{
width: 90%;
height: 100px;
background-color: blue;
}
```
![zh-cn_image1](figures/zh-cn_image1.PNG)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册