响应滑块面板与方向问题

时间:2014-08-14 07:26:01

标签: jquery html css

我在这里有一个响应式幻灯片页面。如何在两个方向(从左到右,从右到左)处理我的幻灯片页面的方向而没有任何冲突。

enter image description here

1 个答案:

答案 0 :(得分:0)

我认为您已经在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>

Updated fiddle