gpt4 book ai didi

css - codeigniter 的分页 CSS 不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 21:53:25 25 4
gpt4 key购买 nike

注意:我刚刚意识到我的 CSS 有问题,浏览器只能查看我的旧 css(意味着我无法编辑我的 css)。怎么了?

我试着按照这个 tutorial ,但我没有做与视频完全相同的事情。

我想编辑我的 pagination 的外观链接(使用 codeigniter )。这是 Controller 代码:

//pagination
$config['base_url'] = site_url('/backend/umat/');
//$config['base_url'] ='http://localhost/ci_gabdb/index.php/backend/umat/';
$config['total_rows'] = $this->backend_m->count_umat();
$config['per_page'] = 10;
$config['uri_segment'] = 3;
$config['full_tag_open'] = '<div id="pagination">';
$config['full_tag_close'] = '</div>';

$this->pagination->initialize($config);

$data['pagination'] = $this->pagination->create_links();

注意我已经使用了full_tag_openfull_tag_close .我还尝试手动插入 <div> html 中的标记,但它们都不起作用。

这是我的 css代码:

#pagination a {
font-family: Tahoma, Geneva, sans-serif;
font-size: 10px;
color: #292929;
text-decoration: none;
background: #e3e3e3;
border: 1px solid #000;
padding: 4px 7px;
}

我认为分页 CSS 应该可以正常工作,但事实并非如此。我的错误在哪里?谢谢:D

最佳答案

这是我正在使用的:

    // pagination code
$config = array();
$config["base_url"] = base_url() . "/themes/all";
$config["total_rows"] = $this->auth_model->record_count();
$config["per_page"] = 30;
$config["uri_segment"] = 3;
$choice = $config["total_rows"] / $config["per_page"];
$config["num_links"] = round($choice);
$config['full_tag_open'] = '<div class="pagination pagination-large"><ul>';
$config['full_tag_close'] = '</ul></div>';
$config['first_link'] = false;
$config['last_link'] = false;
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['prev_link'] = '«';
$config['prev_tag_open'] = '<li class="prev">';
$config['prev_tag_close'] = '</li>';
$config['next_link'] = '»';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li class="active"><a href="#">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';

$this->pagination->initialize($config);

$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$data["themes"] = $this->auth_model->fetch_themes_total($config["per_page"], $page);
$data["links"] = $this->pagination->create_links();
// pagination ends here

关于css - codeigniter 的分页 CSS 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15599183/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com