增量内容在 div 中不起作用
Incremental content do not work inside div
我正在 div 中添加增量项目符号点,但它似乎不起作用。
pres.Rmd
---
title: "Incremental in Div"
output:
xaringan::moon_reader:
encoding: 'UTF-8'
self_contained: false
css: ['default','styles.css']
---
## No div
- Point 1
--
- Point 2
---
## Div direct
Div style is defined directly in HTML/CSS.
<div style="width: 49%;float: left;margin-right: 0.5%;margin-left: 0.5%;">
- Point 1
--
- Point 2
</div>
--
<div style="width: 49%;float: right;margin-right: 0.5%;margin-left: 0.5%;">
- Point 1
--
- Point 2
</div>
---
## Div styles
Div style is defined through classes in the styles.css file.
.pull-left-50[
- Point 1
--
- Point 2
]
--
.pull-right-50[
- Point 1
--
- Point 2
]
styles.css
.pull-right-50 {
width: 49%;
float: right;
margin-right: 0.5%;
margin-left: 0.5%;
}
.pull-left-50 {
width: 49%;
float: left;
margin-right: 0.5%;
margin-left: 0.5%;
}
试试这个:
---
title: "Incremental in Div"
output:
xaringan::moon_reader:
encoding: 'UTF-8'
self_contained: false
css: ['default', "style.css"]
---
.pull-left-50[
- Point 1
{{content}}
]
--
- Point 2
{{content}}
--
- Point 3
{{content}}
--
- Point 4
{{content}}
--
- Point 5
--
.pull-right-50[
- Point 6
{{content}}
]
--
- Point 7
{{content}}
--
- Point 8
{{content}}
--
- Point 9
{{content}}
--
- Point 10
我正在 div 中添加增量项目符号点,但它似乎不起作用。
pres.Rmd
---
title: "Incremental in Div"
output:
xaringan::moon_reader:
encoding: 'UTF-8'
self_contained: false
css: ['default','styles.css']
---
## No div
- Point 1
--
- Point 2
---
## Div direct
Div style is defined directly in HTML/CSS.
<div style="width: 49%;float: left;margin-right: 0.5%;margin-left: 0.5%;">
- Point 1
--
- Point 2
</div>
--
<div style="width: 49%;float: right;margin-right: 0.5%;margin-left: 0.5%;">
- Point 1
--
- Point 2
</div>
---
## Div styles
Div style is defined through classes in the styles.css file.
.pull-left-50[
- Point 1
--
- Point 2
]
--
.pull-right-50[
- Point 1
--
- Point 2
]
styles.css
.pull-right-50 {
width: 49%;
float: right;
margin-right: 0.5%;
margin-left: 0.5%;
}
.pull-left-50 {
width: 49%;
float: left;
margin-right: 0.5%;
margin-left: 0.5%;
}
试试这个:
---
title: "Incremental in Div"
output:
xaringan::moon_reader:
encoding: 'UTF-8'
self_contained: false
css: ['default', "style.css"]
---
.pull-left-50[
- Point 1
{{content}}
]
--
- Point 2
{{content}}
--
- Point 3
{{content}}
--
- Point 4
{{content}}
--
- Point 5
--
.pull-right-50[
- Point 6
{{content}}
]
--
- Point 7
{{content}}
--
- Point 8
{{content}}
--
- Point 9
{{content}}
--
- Point 10