0

我使用 ul 标签在我的页面上创建了分页。电脑上网的时候很好用,手机上网的时候就不行了。我什至无法点击它。你知道是什么问题吗?

这是代码*

$query_pag_num = "SELECT COUNT(*) AS count FROM request WHERE   Req_Status = 'Active' and Req_ID NOT IN(SELECT Req_ID from tweets where U_ID='$userId') ";

if($intcount>0){
    $query_pag_num.="  and  Re_Type IN(SELECT interest from user_interest where userid='$userId')";
}
$result_pag_num = mysql_query($query_pag_num);
$row = mysql_fetch_array($result_pag_num);
$count = $row['count'];
$no_of_paginations = ceil($count / $per_page);

/* ---------------Calculating the starting and endign values for the loop----------------------------------- */
if ($cur_page >= 7) {
$start_loop = $cur_page - 3;
if ($no_of_paginations > $cur_page + 3)
    $end_loop = $cur_page + 3;
else if ($cur_page <= $no_of_paginations && $cur_page > $no_of_paginations - 6) {
    $start_loop = $no_of_paginations - 6;
    $end_loop = $no_of_paginations;
} else {
    $end_loop = $no_of_paginations;
}
} else {
$start_loop = 1;
if ($no_of_paginations > 7)
    $end_loop = 7;
else
    $end_loop = $no_of_paginations;
}
/* ----------------------------------------------------------------------------------------------------------- */
$table.="<div id=\"tab_area\">";
$table .= "<div id='page_tab'><ul>";

// FOR ENABLING THE FIRST BUTTON
if ($first_btn && $cur_page > 1) {
$table .= "<li p='1' class='active'>First</li>";
} else if ($first_btn) {
    $table .= "<li p='1' class='inactive'>First</li>";
}

// FOR ENABLING THE PREVIOUS BUTTON
if ($previous_btn && $cur_page > 1) {
$pre = $cur_page - 1;
$table .= "<li p='$pre' class='active'>Previous</li>";
} else if ($previous_btn) {
    $table .= "<li class='inactive'>Previous</li>";
}
for ($i = $start_loop; $i <= $end_loop; $i++) {

if ($cur_page == $i)
    $table .= "<li p='$i' style='color:#fff;background-color:#006699;' class='active'>{$i}</li>";
else
    $table .= "<li p='$i' class='active'>{$i}</li>";
}

// TO ENABLE THE NEXT BUTTON
if ($next_btn && $cur_page < $no_of_paginations) {
$nex = $cur_page + 1;
$table .= "<li p='$nex' class='active'>Next</li>";
} else if ($next_btn) {
    $table .= "<li class='inactive'>Next</li>";
}

// TO ENABLE THE END BUTTON
if ($last_btn && $cur_page < $no_of_paginations) {
$table.= "<li p='$no_of_paginations' class='active'>Last</li>";
} else if ($last_btn) {
    $table .= "<li p='$no_of_paginations' class='inactive'>Last</li>";
}
$table = $table . "</ul></div>
<p class=\"alignC mt10 fontS\">(全3000件中1500件表示)</p>
</div>";  // Content for pagination
echo $table;

这是CSS代码

#page_tab ul li.inactive, 
#page_tab ul li.inactive:hover{
    display:none;
}

.data ul li{
    list-style: none;
    font-family: verdana;
    margin: 5px 0 5px 0;
    color: #000;
    font-size: 13px;
}

#page_tab{
    width: 500px;
margin: 20px auto 0 auto;
text-align: center;
font-size: 0.8em;
font-style: normal;
    height: 25px;               
}

#page_tab ul li{
    list-style: none;
display:inline;
    border: 1px solid #006699;
    padding: 2px 6px 2px 6px;
    margin: 0 3px 0 3px;
    font-family: arial;
    font-size: 14px;
    color: #006699;
    font-weight: bold;
    background-color: #f2f2f2;
}

#page_tab ul li:hover{
    color: #fff;
    background-color: #006699;
    cursor: pointer;
}

预先感谢。

4

0 回答 0