我正在使用Drupal 7和Field Slideshow插件。我发布了幻灯片和工作。它有一个寻呼机,名称为'Prev'和'Next'
我不想要文字,必须形象。我该怎么办?
<div id="field-slideshow-<?php print $slideshow_id; ?>-controls" class="field-slideshow-controls">
<a href="#" class="prev"><?php print t('Prev'); ?></a>
<?php if (!empty($controls_pause)) : ?>
<a href="#" class="play"><?php print t('Play'); ?></a>
<a href="#" class="pause"><?php print t('Pause'); ?></a>
<?php endif; ?>
<a href="#" class="next"><?php print t('Next'); ?></a>
</div>
答案 0 :(得分:1)
<div id="field-slideshow-<?php print $slideshow_id; ?>-controls" class="field-slideshow-controls">
<a href="#" class="prev"></a>
<?php if (!empty($controls_pause)) : ?>
<a href="#" class="play"><?php print t('Play'); ?></a>
<a href="#" class="pause"><?php print t('Pause'); ?></a>
<?php endif; ?>
<a href="#" class="next"></a>
</div>
这样的风格:
.prev {
display:inline-block;
width:20px;
height:20px;
background: transparent url('path/to/prev/image.png') no-repeat center center;
}
.next {
display:inline-block;
width:20px;
height:20px;
background: transparent url('path/to/next/image.png') no-repeat center center;
}
或者你可以这样:
<div id="field-slideshow-<?php print $slideshow_id; ?>-controls" class="field-slideshow-controls">
<a href="#" class="prev"><img scr="path/to/prev/image.png" alt="<?php print t('Prev'); ?>" /></a>
<?php if (!empty($controls_pause)) : ?>
<a href="#" class="play"><?php print t('Play'); ?></a>
<a href="#" class="pause"><?php print t('Pause'); ?></a>
<?php endif; ?>
<a href="#" class="next"><img scr="path/to/next/image.png" alt="<?php print t('Next'); ?>" /></a>
</div>