我有一个视频作为背景,所以我只想加载页面的内容,因为其他一切都是相同的。我尝试使用Ajax,但我无法使用它。有没有办法实现这一目标? 布局代码:
/...
<body>
<video autoplay loop poster="/img/bg-still.png" preload="auto" id="bg">
<source src="/img/bg.webm" type="video/webm">
</video>
<div id="wrapper">
<header>
<div class="top_line">
<div class="container">
<div class="row">
<?php
if ($user = $this->identity()) {
?>
<div class="col-lg-6 pull-left">
<p>
<span class="welcome-show">Здравей, <?php echo $this->EscapeHtml($user->nick) ?></span>
<span class="rank">Ранк:
<?php
switch ($user->role) {
case 1:
?> <span class="rank-vip">VIP</span> <?php
break;
case 2:
?> <span class="rank-vipplus">VIP+</span> <?php
break;
default:
?> <span class="rank-none">Никакъв</span> <?php
break;
}
?>
</span>
<span class="credits-show">Кредити: <?php echo $this->EscapeHtml($user->credits) ?></span>
<a href="/charge-credits" class="credits-charge-link"><img src="/img/ui-icon-credits" class="ui-icon-credits"/>Заредете кредити</a>
<a href="/edit" class="register"><span
class="icon icon-settings ui-icon ui-icon-gear"></span>Настройки</a>
<a href="/logout" class="register"><span
class="icon icon-logout ui-icon ui-icon-close"></span>Излез</a>
</p>
</div>
<?php
} else {
?>
<div class="col-lg-6 pull-left">
<p>
<a href="/login" class="login"><span class="icon icon-login ui-icon ui-icon-key"></span>Влез</a>
<a href="/register" class="register"><span
class="icon icon-register ui-icon ui-icon-person"></span>Регистрирай се</a>
</p>
</div>
<?php
}
?>
</div>
</div>
</div>
</header>
<div class="page_head">
<div class="nav-container" style="height: auto;">
<nav>
<div class="container">
<div class="row">
<div class="col-lg-3 pull-left">
<a href="/">
<div class="logo"></div>
</a>
<div class="beta">BETA</div>
</div>
<div class="col-lg-9 pull-right">
<div class="menu">
<div id="dl-menu" class="dl-menuwrapper">
<button class="dl-trigger">Open Menu</button>
<?php
echo $this->navigation('navigation')->menu();
?>
</div>
</div>
</div>
</div>
</div>
</nav>
</div>
</div>
<div class="content" id="content">
<?php echo $this->content; ?>
</div>
<div class="footer">
/...