とDIV /ボタンを移動すると、私は は、私はあなたがボタン/ DIVを押したときに出てくるサイドバーからスライドしてきたが、私はボタン/ divのは、あまりにもここでそれを引き出したいjqueryの
<html>
<meta name="viewport" content="width=device-width"/>
<div id="header1">
<p>BillIsChill<p>
<div id="menubutton">
<hr id="hr1">
<hr id="hr2">
<hr id="hr3">
</div>
</div>
<?php include('sidebar.html');?>
<script src="/Scripts/script.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"> </script>
<link type="text/css" rel="stylesheet" href="desktopstyle.css" />
<link type="text/css" rel="stylesheet" href="style_darkcyan.css" />
<link type="text/css" rel="stylesheet" href="sidebarBETA.css" /> <body>
<script>
$(document).on("click", "#menubutton", function(){
$('#sidebarright').toggle('slow');
})
</script>
を試してきたものです
とここで私は
#menubutton.open{
right: 205;
}
#menubutton{
display-inline;
width:50px;
height:50px;
background:#006666;
float:right;
border-radius:10px;
margin-top: 5px;
margin-bottom: 5px;
margin-right:5px;
right: 5px;
}
#menubutton:hover{
background:cadetblue;
}
#sidebarright.open{
right: 1;
}
#sidebarright{
background: darkcyan;
text-align: center;
z-index: 2;
position: fixed;
height: 100%;
width: 200px;
float: right;
top: 0;
overflow-y: scroll;
overflow-x: hidden;
transition: right 0.5s;
right:-200;
}
を使用しています私の関連スタイルで誰かが私に
HTMLを追加できますか? – Gerard
2つのイベントハンドラを一緒に参加させることはできますが、表示したコードにすぐに間違ったものはありません。この問題は、CSSコードまたはJSコードのどこかに置く必要があります。残念ながら、そのコードを表示するために質問を編集しない限り、誰もあなたを助けることはできません。 –
メニューボタンのように見えるのはdivなので、ヘッダとリンクスタイルとphpのためのもの –