我有一个使用Bootstrap 3的页面。在这个页面中,我有一个如下定义的导航栏:
function gallery($real_name) {
/*echo "<pre>"; print_r($real_name); die();*/
foreach($real_name as $k=>$v) {
// $sql = "INSERT INTO gallery SET image = '".$v->image."'"; /*echo "{$k} => {$v}";*/
// /*print_r($sql); die;*/ } die();
// if($this->DB->exeQuery($sql)) { return true; } }
}
}
导航栏在大屏幕上看起来像我想要的那样。但在移动设备上,它无法正常工作。正如您在此Bootply中看到的那样,导航菜单会将主要内容(Lorem Ipsum)向下推。但是,我希望导航菜单显示在内容的顶部,以便移动导航显示在Lorem Ipsum的顶部。我做错了什么?
答案 0 :(得分:2)
你想要这样:
http://www.bootply.com/9OB6nhtg4i#
$username = $_SESSION['user'];
$naslov = $_POST['naslov'];//name
$geslo = $_POST['geslo'];//password
$vsebina = $_POST['vsebina'];//description
if (trim($_POST['naslov'])=="" || $_POST['geslo']=="" || $_POST['vsebina']==""){
$status = "<div class='alert-danger'>Fields are empty</div>";
}
else{
$link = open_database_connection();
echo $username;
echo $naslov;
echo $geslo;
echo $vsebina;
$sql = "INSERT INTO projects (name, password, description, username) VALUES ('$naslov','$geslo','$vsebina','$username')";
mysqli_query($link, $sql);
close_database_connection($link);
$status = "<div class='alert-success'>Vic je bil dodan.</div>";
}
添加此css并尝试。
答案 1 :(得分:1)