<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href='<?=base_url().'css/button.css'?>' rel="stylesheet" type="text/css">
<div class="buttonContainer">
<a class="button large blue" href="gearman">Gearman</a>
<a class="button large blue" href="tuxedo">Tuxedo</a>
</div>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href='<?=base_url().'css/button.css'?>' rel="stylesheet" type="text/css">
<div class="buttonContainer">
<a class="button large blue" href="gearman">Gearman</a>
<a class="button large blue" href="tuxedo">Tuxedo</a>
</div>
</html>
主要注意的是herf的值只需要填写相对路径即可
<a class="button large blue" href="gearman">Gearman</a>
这个链接最终访问到的是http://localhost/index.php/gearman
本文介绍了一个简单的HTML页面布局案例,展示了如何使用CSS对按钮进行样式设置,并通过相对路径设置链接。具体包括了如何创建带有样式的链接按钮,以及这些链接指向的目标页面。

189

被折叠的 条评论
为什么被折叠?



