image.md 1.67 KB
Newer Older
1 2 3 4 5 6 7 8
---
order: 2
title: With Image
---

带图片的页头。

````jsx
nikogu's avatar
nikogu committed
9
import PageHeader from 'ant-design-pro/lib/PageHeader';
10 11 12 13 14 15 16

const content = (
  <div>
    <p>段落示意:蚂蚁金服务设计平台-design.alipay.com,用最小的工作量,无缝接入蚂蚁金服生态,
提供跨越设计与开发的体验解决方案。</p>
    <div className="link">
      <a>
afc163's avatar
afc163 committed
17
        <img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/MjEImQtenlyueSmVEfUD.svg" /> 快速开始
18 19
      </a>
      <a>
afc163's avatar
afc163 committed
20
        <img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/NbuDUAuBlIApFuDvWiND.svg" /> 产品简介
21 22
      </a>
      <a>
afc163's avatar
afc163 committed
23
        <img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/ohOEPSYdDTNnyMbGuyLb.svg" /> 产品文档
24 25 26 27 28 29 30
      </a>
    </div>
  </div>
);

const extra = (
  <div className="imgContainer">
afc163's avatar
afc163 committed
31
    <img style={{ width: '100%' }} alt="" src="https://gw.alipayobjects.com/zos/rmsportal/RzwpdLnhmvDJToTdfDPe.png" />
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
  </div>
);

const breadcrumbList = [{
  title: '一级菜单',
  href: '/',
}, {
  title: '二级菜单',
  href: '/',
}, {
  title: '三级菜单',
}];

ReactDOM.render(
  <div>
    <PageHeader
      title="这是一个标题"
      content={content}
      extraContent={extra}
      breadcrumbList={breadcrumbList}
    />
  </div>
, mountNode);
````

<style>
#scaffold-src-components-PageHeader-demo-image .imgContainer {
afc163's avatar
afc163 committed
59 60 61
  margin-top: -60px;
  text-align: center;
  width: 195px;
62 63 64 65 66 67 68 69 70 71 72 73
}
#scaffold-src-components-PageHeader-demo-image .link {
	margin-top: 16px;
}
#scaffold-src-components-PageHeader-demo-image .link a {
  margin-right: 32px;
}
#scaffold-src-components-PageHeader-demo-image .link img {
  vertical-align: middle;
  margin-right: 8px;
}
</style>