javascript - 如何让饼图菜单保持在后台?

标签 javascript css reactjs

我有一个涵盖所有组件的页面布局

const PageLayout = ({ children, navBar }) => {
  return (
    <section>
      <Container id="content">
        <MenuCricle id='menu' parrentWidth={350} menuData={donutData} childWidth={60} />
        <MenuCricle id='language' parrentWidth={140} menuData={languageData} childWidth={20} />
        {children}
      </Container>
      <Footer>
        <div className="text-center">&copy; 2017. {settings.app.name}.</div>
      </Footer>
    </section>
  );
};

每个页面都有这样的原型(prototype)

class SecuritySystemPage extends Component {
  render() {
    return (
      <PageLayout>
       {//some thing to display here}
      </PageLayout>
    )
  }
}

使用上面的PageLayout时得到的结果是: failed 但我的预期结果是: enter image description here

有什么办法可以达到我的预期结果吗?预先感谢您!

最佳答案

以下演示了添加 float:right 时输出的显示方式。

  • 相邻元素环绕 float 内容。
  • 您可以向 float 元素添加边距,以在其周围留出空间。

.circle{
width:100px;
height:100px;
background:blue;
border:5px solid darkblue;
border-radius:50%;
float:right;
margin:15px;
}
<p>This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works </p>

<p>This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works </p>

<div class="circle"></div>

<p>This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works </p>

<p>This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works </p>

<p>This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works This is random content to show you how float right works </p>

关于javascript - 如何让饼图菜单保持在后台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47988211/

相关文章:

CSS 将列表定位到底部,以便最后一个列表项可见

javascript - onmouseover 改变 html img 对象的 src 的 addEventListener

javascript - 如何在 Ionic 3 中打开文档 (.doc .ppt .pdf .xlsx)?

javascript - 如何删除我网站上不需要的警报?

css - item多行时如何在同一行显示字段标签和字段项?

javascript - 在站点加载时运行 javascript

reactjs - 如何正确删除组件上的填充

javascript - React如何在生命周期方法中处理对象严格相等

reactjs - 在 Redux 中使用 Spread 运算符或 Object.assign 的正确做法是什么?

javascript - 首次打开时 YUI 菜单渲染低于 "fold"