首页 > 解决方案 > 使用带有预加载 HTML 的 React

问题描述

这是我的场景。

例子:

<body>
 <div id="react-target">
    <section id="main">
        <h1>Title goes here</h1>
        <p>Text goes here</p>
    </section>
    <section id="section2">
        <h1>Title goes here</h1>
        <p>Text goes here</p>
    </section>
    <section id="section3">
        <h1>Title goes here</h1>
        <p>Text goes here</p>
    </section>
    <section id="section4">
        <h1>Title goes here</h1>
        <p>Text goes here</p>
    </section>
 </div>
</body>

有没有办法“反应”这个 dom 内容?我想获取这些 DOM 内容(包括视觉表示),然后将它们变成可滑动的全屏“页面”,类似于 jQuery / SwiperJS 的工作方式。

标签: javascriptreactjs

解决方案


推荐阅读