ورود

View Full Version : دوستان مشكل اين كد Html چيه كه به هم ريخته اجرا مي شه؟



complexcoding
جمعه 02 فروردین 1392, 03:49 صبح
دوستان سلام
دوستان مشكل اين كد Html چيه كه به هم ريخته اجرا مي شه؟ مربوط به ايجاد تب هستش.

<style>/* override the root element to enable scrolling */
.css-panes {
height: 410px;
width: 702px;
position:relative;
overflow:hidden;
clear:both;
background-color: transparent;
}

/* override single pane */
.css-panes div {
float:left;
display:block;
width:660px;
font-size:14px;
background-color: transparent;
}

/* our additional wrapper element for the items */
.css-panes .items {
width:20000em;
position:absolute;
clear:both;
margin:0;
padding:0;
border:0;
}


.css-panes .less, .css-panes .less a {
color:#999 !important;
font-size:11px;
}
</style>
<script>// wait until document is fully scriptable
$(function() {

// select #flowplanes and make it scrollable. use circular and navigator plugins
$(".css-panes").scrollable({ circular: true, mousewheel: true }).navigator({

// select #flowtabs to be used as navigator
navi: ".css-tabs",

// select A tags inside the navigator to work as items (not direct children)
naviItem: 'a',

// assign "current" class name for the active A tag inside navigator
activeClass: 'current',

// make browser's back button work
history: true

});
});</script>
<!-- "Previous" action -->
<button class="prev">&laquo; Previous</button>

<!-- "Next" action -->
<button class="next">Next &raquo;</button>
<!-- tabs work as navigator for scrollable -->
<ul id="tabs" class="css-tabs navi">
<li><a id="t1" class="current" href="#story">The Story</a></li>
<li><a id="t2" href="#features">Features</a></li>
<li><a id="t3" href="#plugins">Plugins</a></li>
<li><a id="t4" href="#demos">Demos</a></li>
</ul>
<!-- tab panes -->
<div id="flowpanes">

<!-- wrapper for scrollable items -->
<div class="items">

<!-- the items -->
<div id="t1" class="current" href="#story"> [ any HTML here ]</div>
<div id="t2" href="#features"> [ any HTML here ]</div>
<div id="t3" href="#plugins"> [ any HTML here ]</div>
<div id="t4" href="#demos"> [ any HTML here ]</div>

</div>

</div>

maktoom
جمعه 02 فروردین 1392, 09:00 صبح
سلام
منظورتون از بهمریختگی چیه. من این رو اینطوری ویرایش کردم(درستش هم همینجوریه) شما تست کن ببین مشکلت حل میشه:
<html>
<head>
<style>/* override the root element to enable scrolling */
.css-panes {
height: 410px;
width: 702px;
position:relative;
overflow:hidden;
clear:both;
background-color: transparent;
}

/* override single pane */
.css-panes div {
float:left;
display:block;
width:660px;
font-size:14px;
background-color: transparent;
}

/* our additional wrapper element for the items */
.css-panes .items {
width:20000em;
position:absolute;
clear:both;
margin:0;
padding:0;
border:0;
}


.css-panes .less, .css-panes .less a {
color:#999 !important;
font-size:11px;
}
</style>
<script>// wait until document is fully scriptable
$(function() {

// select #flowplanes and make it scrollable. use circular and navigator plugins
$(".css-panes").scrollable({ circular: true, mousewheel: true }).navigator({

// select #flowtabs to be used as navigator
navi: ".css-tabs",

// select A tags inside the navigator to work as items (not direct children)
naviItem: 'a',

// assign "current" class name for the active A tag inside navigator
activeClass: 'current',

// make browser's back button work
history: true

});
});</script>
</head>
<body>
<!-- "Previous" action -->
<button class="prev">&laquo; Previous</button>

<!-- "Next" action -->
<button class="next">Next &raquo;</button>
<!-- tabs work as navigator for scrollable -->
<ul id="tabs" class="css-tabs navi">
<li><a id="t1" class="current" href="#story">The Story</a></li>
<li><a id="t2" href="#features">Features</a></li>
<li><a id="t3" href="#plugins">Plugins</a></li>
<li><a id="t4" href="#demos">Demos</a></li>
</ul>
<!-- tab panes -->
<div id="flowpanes">

<!-- wrapper for scrollable items -->
<div class="items">

<!-- the items -->
<div id="t1" class="current" href="#story"> [ any HTML here ]</div>
<div id="t2" href="#features"> [ any HTML here ]</div>
<div id="t3" href="#plugins"> [ any HTML here ]</div>
<div id="t4" href="#demos"> [ any HTML here ]</div>

</div>

</div>
</body>
</html>

maktoom
جمعه 02 فروردین 1392, 09:05 صبح
برای ایجاد تب از این استفاده کن:
<style type="text/css">

#tabs a {
font-size: 14px;
padding:0px 20px;
border-radius: 2px;
}
.tpl-selected-tab{
font-size: 24px;
background: #fff6c0;
}
.tpl-tab-links{
background: #e8b954;
}

</style>
<div id="tabs">
<div class="tpl-tab-links">
<a href="#" rel="t1">tab1</a>
<a href="#" rel="t2">tab2</a>
<a href="#" rel="t3">tab3</a>
</div>
<div class="contents">
<div id="t1" >tab1</div>
<div id="t2" style="display: none;">tab2</div>
<div id="t3" style="display: none;">tab3</div>
</div>
<script type="text/javascript">
$('a').click(function(){
$('div.contents > div').hide();

$('#tabs a').removeClass('tpl-selected-tab')
$(this).addClass('tpl-selected-tab')
$('#'+ $(this).attr('rel')).show();
return false;
});
</script>
کد قبلیت رو اول متوجه نشدم واسه تب گذاشتی.
موفق باشی./

complexcoding
جمعه 02 فروردین 1392, 13:34 عصر
ممنون ولي باز هم به هم ريخته ظاهر شد!!!
اينم لينكش
complexcoding.mihanblog.com.