Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/guide/essentials/class-and-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,20 @@ data() {

スタイルへのオブジェクトのバインディングも、オブジェクトを返す算出プロパティと組み合わせて使用することが多くあります。

`:class` と同様、`:style` ディレクティブは通常の style 属性と共存させることもできます。

テンプレート:

```vue-html
<h1 style="color: red" :style="'font-size: 1em'">hello</h1>
```

レンダリング結果:

```vue-html
<h1 style="color: red; font-size: 1em;">hello</h1>
```

### 配列へのバインディング {#binding-to-arrays-1}

`:style` は、複数のスタイルオブジェクトからなる配列にバインドすることができます。各オブジェクトはマージされ、同じ要素に適用されます:
Expand Down