mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-21 02:36:28 +10:00
470 lines
14 KiB
HTML
470 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||
<meta name="format-detection" content="telephone=no">
|
||
<meta name="description" content="一个 UI 设计语言"/>
|
||
<title>
|
||
对齐 - Ant Design
|
||
</title>
|
||
<link rel="icon" href="https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png" type="image/x-icon">
|
||
<link rel="shortcut icon" href="https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png" type="image/x-icon">
|
||
|
||
<link rel="stylesheet" href="../../dist/demo.css">
|
||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js,jquery/1.11.3/jquery.min.js,bluebird/3.1.1/bluebird.min.js"></script>
|
||
<script>
|
||
(function() {
|
||
window.ANT_COMPONENTS = [];
|
||
window.InstantClickChangeFns = [];
|
||
ANT_COMPONENTS.push({
|
||
title: 'Pagination',
|
||
desc: '分页'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Affix',
|
||
desc: '固钉'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Badge',
|
||
desc: '徽标数'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Breadcrumb',
|
||
desc: '面包屑'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Button',
|
||
desc: '按钮'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Calendar',
|
||
desc: '日历'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Carousel',
|
||
desc: '走马灯'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Cascader',
|
||
desc: '级联选择'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Checkbox',
|
||
desc: '多选框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Collapse',
|
||
desc: '折叠面板'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'DatePicker',
|
||
desc: '日期选择框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Dropdown',
|
||
desc: '下拉菜单'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Form',
|
||
desc: '表单'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Icon',
|
||
desc: '图标'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'InputNumber',
|
||
desc: '数字输入框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Layout',
|
||
desc: '布局'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Menu',
|
||
desc: '导航菜单'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Message',
|
||
desc: '全局提示'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Modal',
|
||
desc: '对话框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Notification',
|
||
desc: '通知提醒框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Alert',
|
||
desc: '警告提示'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Popconfirm',
|
||
desc: '气泡确认框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Popover',
|
||
desc: '气泡卡片'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Progress',
|
||
desc: '进度条'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'QueueAnim',
|
||
desc: '进出场动画'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Radio',
|
||
desc: '单选框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Select',
|
||
desc: '选择器'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Slider',
|
||
desc: '滑动输入条'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Spin',
|
||
desc: '加载中'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Steps',
|
||
desc: '步骤条'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Switch',
|
||
desc: '开关'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Table',
|
||
desc: '表格'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Tabs',
|
||
desc: '标签页'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Tag',
|
||
desc: '标签'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'TimePicker',
|
||
desc: '时间选择框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Timeline',
|
||
desc: '时间轴'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Tooltip',
|
||
desc: '文字提示'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Transfer',
|
||
desc: '穿梭框'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Tree',
|
||
desc: '树形控件'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'TreeSelect',
|
||
desc: '树选择'
|
||
});
|
||
ANT_COMPONENTS.push({
|
||
title: 'Upload',
|
||
desc: '上传'
|
||
});
|
||
// fix ie location origin
|
||
// http://stackoverflow.com/questions/22564167/window-location-origin-gives-wrong-value-when-using-ie
|
||
if (!window.location.origin) {
|
||
window.location.origin = window.location.protocol + "//"
|
||
+ window.location.hostname
|
||
+ (window.location.port ? ':' + window.location.port : '');
|
||
}
|
||
var i = location.pathname.split('/').lastIndexOf('ant-design');
|
||
if (i > 0) {
|
||
window.rootUrl = location.origin + location.pathname.split('/').slice(0, 2+1).join('/');
|
||
} else {
|
||
window.rootUrl = location.origin;
|
||
}
|
||
})();
|
||
</script>
|
||
<script>
|
||
window.antdVersion = {
|
||
latest: '0.12.12'
|
||
};
|
||
</script>
|
||
<script src="../../dist/demo.js"></script>
|
||
|
||
</head>
|
||
<body >
|
||
<header id="header" class="clearfix">
|
||
<a class="logo" href="../..">
|
||
<img width="60" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg">
|
||
Ant Design
|
||
</a>
|
||
<div class="search">
|
||
<div id="autoComplete"></div>
|
||
</div>
|
||
<nav class="nav" tabindex="-1">
|
||
<span class="bar"></span>
|
||
<ul>
|
||
<li class="">
|
||
<a href="../..">首页</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="../practice/cases">实践</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="../pattern/navigation">模式</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="../react/introduce">组件</a>
|
||
</li>
|
||
<li class="current">
|
||
<a href="./introduce">语言</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="../resource/download">资源</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<div class="nav-phone-icon"></div>
|
||
</header>
|
||
<div class="main-wrapper">
|
||
|
||
<aside class="aside-container">
|
||
<ul>
|
||
<li class="">
|
||
<a href="introduce"
|
||
class="">
|
||
Ant Design
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="feature"
|
||
class="">
|
||
三大特性
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li open="open">
|
||
<h4>十大原则</h4>
|
||
<ul class="">
|
||
<li class="">
|
||
<a href="principle"
|
||
class="">
|
||
引言
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="proximity"
|
||
class="">
|
||
亲密性
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="current">
|
||
<a href="alignment"
|
||
class="">
|
||
对齐
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="contrast"
|
||
class="">
|
||
对比
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="repetition"
|
||
class="">
|
||
重复
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="direct"
|
||
class="">
|
||
直截了当
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="lightweight"
|
||
class="">
|
||
简化交互
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="stay"
|
||
class="">
|
||
足不出户
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="invitation"
|
||
class="">
|
||
提供邀请
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="transition"
|
||
class="">
|
||
巧用过渡
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="reaction"
|
||
class="">
|
||
即时反应
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li open="open">
|
||
<h4>设计基础</h4>
|
||
<ul class="">
|
||
<li class="">
|
||
<a href="font"
|
||
class="">
|
||
字体
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="typography"
|
||
class="">
|
||
排版
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="colors"
|
||
class="">
|
||
色彩
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="layout/"
|
||
class="">
|
||
常用布局
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li open="open">
|
||
<h4>动画</h4>
|
||
<ul class="">
|
||
<li class="">
|
||
<a href="easing"
|
||
class="">
|
||
自然运动
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
<li class="">
|
||
<a href="motion"
|
||
class="">
|
||
组件动画
|
||
<span class="chinese"></span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</aside>
|
||
|
||
<section class="main-container">
|
||
<article class="markdown">
|
||
<h1>对齐 <span class="subtitle">Alignment</span></h1>
|
||
|
||
<p>正如『格式塔学派』中的连续律(Law of Continuity)所描述的,在知觉过程中人们往往倾向于使知觉对象的直线继续成为直线,使曲线继续成为曲线。在界面设计中,将元素进行对齐,既符合用户的认知特性,也能引导视觉流向,让用户更流畅地接收信息。</p>
|
||
<blockquote>
|
||
<p><strong> 格式塔学派(德语:Gestalttheorie)</strong> :是心理学重要流派之一,兴起于 20 世纪初的德国,又称为完形心理学;主张人脑的运作原理是整体的,『整体不同于其部件的总和』。——摘自『维基百科』</p>
|
||
</blockquote>
|
||
|
||
<div class="toc"><ul><li><a href="#文案类对齐">文案类对齐</a></li><li><a href="#表单类对齐">表单类对齐</a></li><li><a href="#数字类对齐">数字类对齐</a></li></ul></div>
|
||
<h2 id="文案类对齐">文案类对齐<a href="#文案类对齐" class="anchor">#</a> </h2><p><img class="preview-img" align="right" alt="推荐示例" description="标题和正文左对齐,使用了一个视觉起点。" good src="https://os.alipayobjects.com/rmsportal/xvmiAZAIxrEcqdP.png">
|
||
<img class="preview-img" align="right" alt="不推荐示例" description="标题和正文使用了两个视觉起点,不推荐该种对齐方式,除非刻意强调两者区别。" bad src="https://os.alipayobjects.com/rmsportal/qvycImsTiDGVgLJ.png"></p>
|
||
<p>如果页面的字段或段落较短、较散时,需要确定一个统一的视觉起点。</p>
|
||
<hr>
|
||
<h2 id="表单类对齐">表单类对齐<a href="#表单类对齐" class="anchor">#</a> </h2><p><img class="preview-img" noPadding align="right" alt="冒号对齐示例" src="https://os.alipayobjects.com/rmsportal/DmEbaUsrpJkRyUh.png"></p>
|
||
<p>冒号对齐(右对齐)能让内容锁定在一定范围内,让用户眼球顺着冒号的视觉流,就能找到所有填写项,从而提高填写效率。</p>
|
||
<p>更多对齐方式,请查看<a href="../pattern/form#对齐方式">『模式/表单/规格/对齐方式』</a>。</p>
|
||
<hr>
|
||
<h2 id="数字类对齐">数字类对齐<a href="#数字类对齐" class="anchor">#</a> </h2><p><img class="preview-img" align="right" alt="正确示例" good src="https://os.alipayobjects.com/rmsportal/hCSQTEmahFyQcWk.png">
|
||
<img class="preview-img" align="right" alt="错误示例" bad src="https://os.alipayobjects.com/rmsportal/FDjScmPlWFPxkxL.png"></p>
|
||
<p>为了快速对比数值大小,建议所有数值取相同有效位数,并且右对齐。</p>
|
||
|
||
</article>
|
||
</section>
|
||
|
||
</div><footer id="footer">
|
||
<ul>
|
||
<li>
|
||
<h2>GitHub</h2>
|
||
<a target="_blank "href="https://github.com/ant-design/ant-design">仓库</a>
|
||
<a target="_blank" href="https://github.com/ant-design/antd-init">脚手架</a>
|
||
<a target="_blank" href="http://ant-tool.github.io/">开发工具</a>
|
||
</li>
|
||
<li>
|
||
<h2>关于我们</h2>
|
||
<a target="_blank" href="https://github.com/ant-ued/blog">博客 - Ant UED</a>
|
||
</li>
|
||
<li>
|
||
<h2>联系我们</h2>
|
||
<a target="_blank" href="https://github.com/ant-design/ant-design/issues">反馈和建议</a>
|
||
<a target="_blank" href="https://gitter.im/ant-design/ant-design">讨论</a>
|
||
<a target="_blank" href="http://dwz.cn/2AF9ao">报告 Bug</a>
|
||
</li>
|
||
<li>
|
||
<div>©2015 蚂蚁金服体验技术部出品</div>
|
||
<div>文档版本:<span id="versions-select"></span></div>
|
||
</li>
|
||
</ul>
|
||
</footer>
|
||
<script data-no-instant>
|
||
if (!location.port) {
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
ga('create', 'UA-72788897-1', 'auto');
|
||
ga('send', 'pageview');
|
||
InstantClick.on('change', function() {
|
||
ga('send', 'pageview', location.pathname + location.search);
|
||
});
|
||
}
|
||
</script>
|
||
<script data-no-instant>
|
||
InstantClick.on('change', function() {
|
||
InstantClickChangeFns.forEach(function(fn) {
|
||
fn();
|
||
});
|
||
});
|
||
InstantClick.init();
|
||
</script>
|
||
</body>
|
||
</html> |