"README.en-US.md" did not exist on "99ae700f5599f6cee8a20379301af70c5eb91702"
image.md 1.75 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

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

const extra = (
  <div className="imgContainer">
afc163's avatar
afc163 committed
30
    <img style={{ width: '100%' }} alt="" src="https://gw.alipayobjects.com/zos/rmsportal/RzwpdLnhmvDJToTdfDPe.png" />
31 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
  </div>
);

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

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

<style>
ddcat1115's avatar
ddcat1115 committed
57 58 59
#scaffold-src-components-PageHeader-demo-image .code-box-demo {
  background: #f2f4f5;
}
60
#scaffold-src-components-PageHeader-demo-image .imgContainer {
afc163's avatar
afc163 committed
61 62 63
  margin-top: -60px;
  text-align: center;
  width: 195px;
64 65 66 67 68 69 70 71 72 73 74 75
}
#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>