我这里有一个响应式滑动面板页面。我如何处理我的滑动面板页面的两个方向(从左到右,从右到左)而没有任何冲突。
最佳答案
我假设您已经在 html
中定义了说明,因此您需要修改以下代码以满足您的需要:
CSS:
#panel {
height: 450px;
width: 200px;
background: black;
display: none;
color: white;
font-size: xx-large;
}
#panel[direction="ltr"] {
float:left;
}
#panel[direction="rtl"] {
float: right;
}
HTML:
<div id='panel' direction="rtl">Pannel Details here</div>
或
<div id='panel' direction="ltr">Pannel Details here</div>
关于jquery - 具有方向问题的响应式 slider 面板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25302327/