网页上有联系表格7,我需要将其固定在右侧。打开页面后,表单被隐藏,只有表单按钮(打开)可见。点击后,表格应打开。
答案 0 :(得分:0)
您的元素:
$checkifuserExist= DB::table('track_dailies')->where('user_id','=',\Auth::user())->where('created_at','>=',Carbon::today())->count();
if($checkifuserExist>0)
{
//proceed to query for fitness
}
else
{
//do something else...
}
样式:
<div onClick="myFunction()" id="myForm">open</div>
javascript:
<style>
#myForm{
background: red;
width: 200px;
height: 200px;
position: fixed;
top: 0px;
right: -120px;
cursor: hand;
cursor: pointer;
}
</style>