我已经整理了一些类似于您所描述的内容的小模型来帮助您入门。此解决方案需要 jQuery 和 jQuery UI,本质上是创建一个动画来炸毁圆形 DIV 元素以填充整个页面。
HTML:
<div class="circle">
<div>RED Contents go here!</div>
</div>
<div class="circle">
<div>GREEN Contents go here!</div>
</div>
<div class="circle">
<div>BLUE Contents go here!</div>
</div>
CSS:
.circle {
display: inline-block;
position: absolute; left: 50%; top: 50%;
height: 50px; width: 50px;
margin: -25px 0 0 -25px;
cursor: pointer;
border-radius: 25px;
z-index: 0;
}
.circle:nth-child(1) { background: red; margin-left: -80px; }
.circle:nth-child(2) { background: green; }
.circle:nth-child(3) { background: blue; margin-left: 30px; }
.circle > div { display: none; }
.circle.expanded > div { display: block; }
jQuery:
$('.circle').on('click', function() {
var $this = $(this);
$this.css('z-index', 2)
.siblings('.circle').removeClass('expanded').css('z-index', 1);
$this.animate({
left: 0, top: 0, margin: 0,
width: '100%', height: '100%',
'border-radius': 0, padding: '60px 5px 5px 5px'
}, 1000).addClass('expanded');
$this.siblings('.circle').animate({
left: 0, top: 0, height: 50, width: 50,
'border-radius': 25, padding: '0'
}).first().css({ 'margin': '5px' })
.next().css({ 'margin': '5px 5px 5px 55px' });
$this.css('z-index', 0);
});
基本上,这允许您创建三个DIV 元素,每个元素都包含您要显示的单独页面的 HTML。最初的 CSS 将所有 3 个圆圈放在页面中间,并使其所有子元素不可见。
然而,一旦您单击一个,jQuery .animate() 调用将调整各种元素的位置,展开单击的元素以填充窗口,并移动 z-indexes 以便您的其他两个导航选项保持打开状态顶。
Here is a working jsFiddle 可以用来调整效果。如果您对如何使用它有任何疑问,请随时提出,我会尽力提供进一步的帮助。