我的代码需要您的建议.首先,我展示代码:
$('tr:gt(9)').hide();
$('button.btn-primary').on('click', function() {
var visible = $('tr:visible').length;
$('tr:gt('+visible+')').slice(0,5).show();
})Run Code Online (Sandbox Code Playgroud)
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Producent</th>
<th>Produkt</th>
<th>Foto</th>
<th>Typ</th>
<th>Cena netto</th>
<th>Cena brutto</th>
<th>Interface</th>
<th>Ilo?? dysków</th>
<th>Pojemno??</th>
<th>RAID</th>
<th>Wydajno??</th>
<th>Opis</th>
<th>Specyfikacja</th>
<th>Zakup</th>
</tr>
</thead>
<tbody class="results">
<tr><td>G-Tech</td><td>vcxv</td><td><img src="admin/forms/temp/" style = "width:50px;height:50px;" alt="BRAK ZDJ?CIA"/></td><td>DAS Direct Attached Storage</td><td>50.00</td><td>70.00</td><td>USB 3.0</td><td>5</td><td>400</td><td>5*5*</td><td>500</td><td>dsadsad</td><td style='display:none;'>1</td><td><a href=http://www.o2.pl target='_blank'>Specyfikacja producenta</a></td><td><form action='' method='POST'>
<input type='hidden' name='id' value='34' />
<input class='btn btn-primary btn-sm' type='submit' name='koszykAdd' value='Dodaj do koszyka'/></form></td></tr><tr><td>LaCie</td><td>Macierz</td><td><img src="admin/forms/temp/depositphotos_12071772-Website-Development-PHP-HTML-Arrows.jpg" style = "width:50px;height:50px;" alt="BRAK ZDJ?CIA"/></td><td>SAN Srorage Area Network</td><td>98.00</td><td>120.00</td><td>miniSAS</td><td>6</td><td>4 TB</td><td>5</td><td>Du?a</td><td>Tu powinien …Run Code Online (Sandbox Code Playgroud)所以,我正在使用PHP,SQL和其他后端语言.我的客户希望在他的网站上获得动态过滤器.我在互联网上找到了一个脚本,但它不起作用.
$(document).ready(function() {
$('.results > td').hide();
$('div.tags').find('input:checkbox').on('click', function() {
$('.results > td').hide();
$('div.tags').find('input:checked').each(function() {
$('.results > td.' + $(this).attr('rel')).show();
});
});
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="box col-md-12 items tags">
<ul>
<li class="head">Producent</li>
<li>
<input id="producent1" type="checkbox" class="szukajnapraw Promise" rel="Promise" />Promise</li>
<li>
<input id="producent2" type="checkbox" class="szukajnapraw NetStor" rel="NetStor" />NetStor</li>
<li>
<input id="producent3" type="checkbox" class="szukajnapraw Stardom" rel="Stardom" />Stardom</li>
<li>
<input id="producent4" type="checkbox" class="szukajnapraw LaCie" rel="LaCie" />LaCie</li>
<li>
<input id="producent5" type="checkbox" class="szukajnapraw G-Tech" rel="G-Tech" />G-Tech</li>
<li>
<input id="producent6" type="checkbox" class="szukajnapraw mLogic" rel="mLogic" />mLogic</li> …Run Code Online (Sandbox Code Playgroud)我尝试用图像制作背景,这个图像 我有这个代码(bootstrap上的页面).
.cover-losos{
background: url('http://patwoj.hekko24.pl/zdrowie/images/losos.jpg') no-repeat center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
}Run Code Online (Sandbox Code Playgroud)
<div class="container-fluid">
<div class="row">
<div class="col-md-12 cover-losos">
</div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
为什么不显示照片?我究竟做错了什么?