如何始终在HTML中显示锚标记的alt属性?
这是我有多个重复网格的情况,我想用日期来识别.
所以我想总是展示标题,我怎样才能实现这一目标?
<a href="#" title="created at 12 october">see details</a>
<a href="#" title="created at 13 october">see details</a>
<a href="#" title="created at 14 october">see details</a>
Run Code Online (Sandbox Code Playgroud)
这是一个演示:https://jsfiddle.net/wub5y96d/1/
任何人都可以向我解释为什么只打印这个数组的第一项?
print "Hello World!\n";
@array1 = ("john","haider","elley","uul");
@array2 = qw/This is an array/;
$array_size=scalar @array1;
print "Size: ",$array_size,"\n";
$i;
for($i=0; $i<=$array_size; $i=$i+1)
{
print"Array elements are=",$array1[i],"\n";
}
Run Code Online (Sandbox Code Playgroud) 我正在使用以下代码.复选框不希望用我给它的样式进行检查.
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<div class="checkbox">
<input name="remember" type="checkbox" ><label>Wachtwoord onthouden</label>
</div>
</div>
</div>'
Run Code Online (Sandbox Code Playgroud)
和css:
col-md-4.control-label, #email, #password {
margin: 20px auto;
width: 300px;
resize: none;
font-family: 'Exo 2', sans-serif;
font-size: 1em;
outline: none;
}
.btn.btn-link, .checkbox {
display: block;
margin-top:20px;
margin-bottom:20px;
color: $white;
}
[type="checkbox"]:not(:checked),
[type="checkbox"]:checked {
position: absolute;
left: -9999px;
}
[type="checkbox"]:not(:checked) + label,
[type="checkbox"]:checked + label {
position: relative;
padding-left: 25px;
cursor: pointer;
}
/* checkbox aspect */
[type="checkbox"]:not(:checked) + label:before,
[type="checkbox"]:checked + label:before { …Run Code Online (Sandbox Code Playgroud) 免责声明:我使用该flickity-slider库来实现基本的幻灯片效果。
我创建了各种元素的幻灯片<div>,所有元素都包含图片元素、标题和一些内容。使用以下模拟 HTML 结构:
.b-slider__slides {
display: flex;
flex-flow: row nowrap;
width: 100%;
overflow: hidden;
}
.b-slider__slide {
margin: 0 2.5rem;
text-align: center;
}
a {
color: #000;
text-decoration: underline;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="b-slider__slides js-main-slider">
<div class="b-slider__slide">
<a href="#" class="b-slider__ref">
<picture class="b-slider__picture">
<img src="https://via.placeholder.com/350x150" alt="Couple in car">
</picture>
<span class="b-slider__date">29/01/1993</span>
<h3 class="b-slider__subtitle">Lorem ipsum</h3>
</a>
</div>
<div class="b-slider__slide">
<a href="#" class="b-slider__ref">
<picture class="b-slider__picture">
<img src="https://via.placeholder.com/350x150" alt="Couple in car">
</picture>
<span class="b-slider__date">29/01/1993</span>
<h3 class="b-slider__subtitle">Lorem ipsum</h3>
</a>
</div> …Run Code Online (Sandbox Code Playgroud)