Giter VIP home page Giter VIP logo

Comments (1)

gadenbuie avatar gadenbuie commented on June 12, 2024

It's possible but it does take a little tweaking, depending on how you want to use the attention seekers. Here are some xaringan slides that show you a solution (also here as a gist).

---
title: "animate.css attention seekers with xaringanExtra"
author: "Garrick Aden-Buie"
output:
  xaringan::moon_reader:
    lib_dir: libs
    seal: false
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: true
---

layout: true
class: middle

---

```{r xe, echo=TRUE}
xaringanExtra::use_animate_css()
```

This works fine. Notice that the content inside the `[ ... ]` is on a new line.

.pull-left[
```
.animated.pulse.infinite[
## Hello there!
]
```
]

.pull-right[
.animated.pulse.infinite[
## Hello there!
]
]

---

But this doesn't work...

.pull-left[
```
Make this word
.animated.bounce.infinite[jump!]
```
]

.pull-right[
Make this word
.animated.bounce.infinite[jump!]
]

Notice that the content in the `[...]` is on the **same line**.

---

If we create a simple CSS class that makes an object **inline-block**,
then the animation will work. Drop this CSS into your slides and then add
`.dib` to the `.animated.<attn_seeker>.infinite` classes.


````markdown
```{css echo=FALSE}`r ''`
.dib { display: inline-block; }
```
````

```{css echo=FALSE}
.dib { display: inline-block; }
```

.pull-left[
```
Make this word
.animated.bounce.infinite.dib[jump!]
```
]

.pull-right[
Make this word .animated.bounce.infinite.dib[jump!]
]

from xaringanextra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.