【问题标题】:Images displayed are as a gallery, but don't want to显示的图像作为画廊,但不想
【发布时间】:2017-03-06 04:20:01
【问题描述】:

我为旅行和摄影制作了这个博客,这是我的主要爱好之一。 我得到了一个免费的模板并自己进行了所有必要的更改,当然这要归功于它的作者。但是我遇到了这个问题...

主页上包含超过 1 张照片的帖子将显示为幻灯片库,我不希望这样,因为当照片是垂直的时它会弄乱布局。

如您所见:http://jcruz-foto.blogspot.pt/search?updated-max=2016-10-29T18%3A30%3A00%2B01%3A00&max-results=7

帖子 nº 6 上写着“Campeonato Regional MX Ribatejo 2016”...

这是与滑块相关的代码。删除它不会起作用哈哈...

<style type='text/css'>
/**
 * BxSlider v4.1.2 - Fully loaded, responsive content slider
 * http://bxslider.com
 *
 * Written by: Steven Wanderski, 2014
 * http://stevenwanderski.com
 * (while drinking Belgian ales and listening to jazz)
 *
 * CEO and founder of bxCreative, LTD
 * http://bxcreative.com
 */


/** RESET AND LAYOUT
===================================*/

.bx-wrapper {
    position: relative;
    margin: 0 auto 60px;
    padding: 0;
    *zoom: 1;
    margin-bottom:15px;
}

.bx-wrapper img {
    max-width: 100%;

}

/** THEME
===================================*/

.bx-wrapper .bx-viewport {
    background: #fff;
    text-align:center;
    /*fix other elements on the page moving (on Chrome)*/
    -webkit-transform: translatez(0);
    -moz-transform: translatez(0);
        -ms-transform: translatez(0);
        -o-transform: translatez(0);
        transform: translatez(0);
}

.bx-wrapper .bx-pager,
.bx-wrapper .bx-controls-auto {
    position: absolute;
    bottom: -30px;
    width: 100%;
}

/* LOADER */

.bx-wrapper .bx-loading {
    min-height: 50px;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
}

/* PAGER */

.bx-wrapper .bx-pager {
    text-align: center;
    font-size: .85em;
    font-family: Arial;
    font-weight: bold;
    color: #666;
    padding-top: 20px;
}

.bx-wrapper .bx-pager .bx-pager-item,
.bx-wrapper .bx-controls-auto .bx-controls-auto-item {
    display: inline-block;
    *zoom: 1;
    *display: inline;
}

.bx-wrapper .bx-pager.bx-default-pager a {
    background: #666;
    text-indent: -9999px;
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    outline: 0;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}

.bx-wrapper .bx-pager.bx-default-pager a:hover,
.bx-wrapper .bx-pager.bx-default-pager a.active {
    background: #000;
}

/* DIRECTION CONTROLS (NEXT / PREV) */

.bx-wrapper .bx-prev {
    left: 20px;
    background: url(http://1.bp.blogspot.com/-WCgfaNs6MAU/VBnoMBFzakI/AAAAAAAABxw/oqXkrdC99Kw/s1600/slider-arrows.png) no-repeat 0 0;
}

.bx-wrapper .bx-next {
    right: 20px;
    background: url(http://1.bp.blogspot.com/-WCgfaNs6MAU/VBnoMBFzakI/AAAAAAAABxw/oqXkrdC99Kw/s1600/slider-arrows.png) no-repeat -30px 0;
}

/*.bx-controls-direction a {
    opacity: 0;
    transition: opacity .25s ease-in-out;
    -moz-transition: opacity .25s ease-in-out;
    -webkit-transition: opacity .25s ease-in-out;
}

.bx-wrapper:hover .bx-controls-direction a {
    opacity: 1;
}*/

.bx-wrapper .bx-next:hover, .bx-wrapper .bx-prev:hover {
    opacity:.7 !important;
}

.bx-wrapper .bx-controls-direction a {
    position: absolute;
    top: 50%;
    margin-top: -15px;
    outline: 0;
    width: 30px;
    height: 30px;
    text-indent: -9999px;
    z-index: 9999;
}

.bx-wrapper .bx-controls-direction a.disabled {
    display: none;
}

/* AUTO CONTROLS (START / STOP) */

.bx-wrapper .bx-controls-auto {
    text-align: center;
}

.bx-wrapper .bx-controls-auto .bx-start {
    display: block;
    text-indent: -9999px;
    width: 10px;
    height: 11px;
    outline: 0;
    background: url(images/controls.png) -86px -11px no-repeat;
    margin: 0 3px;
}

.bx-wrapper .bx-controls-auto .bx-start:hover,
.bx-wrapper .bx-controls-auto .bx-start.active {
    background-position: -86px 0;
}

.bx-wrapper .bx-controls-auto .bx-stop {
    display: block;
    text-indent: -9999px;
    width: 9px;
    height: 11px;
    outline: 0;
    background: url(images/controls.png) -86px -44px no-repeat;
    margin: 0 3px;
}

.bx-wrapper .bx-controls-auto .bx-stop:hover,
.bx-wrapper .bx-controls-auto .bx-stop.active {
    background-position: -86px -33px;
}

/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */

.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
    text-align: left;
    width: 80%;
}

.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
    right: 0;
    width: 35px;
}

/* IMAGE CAPTIONS */

.bx-wrapper .bx-caption {
    position: absolute;
    bottom: 6px;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    padding:20px;
}

.bx-wrapper .bx-caption span {
    color: #fff;
    display: block;
    font-size: 16px;
}

</style>

另外,我想在首页制作较小的垂直图像,但我似乎也做不到......垂直图像太大了

【问题讨论】:

  • 你想要什么结果?您想移除滑块还是自动修复垂直图像的高度?
  • 是的...我不想要一个滑块,在主页我只想要一个图像预览,并修复垂直图像高度,它们太大了

标签: html css image slideshow blogs


【解决方案1】:

嗯,您使用的是 Blogspot 主题,并且此功能已集成到主题中。

您可以从主题设置中将其关闭。

如果您只想通过 CSS 摆脱此功能,请将此代码粘贴到样式表的底部。

请记住,这是一个 HACK,因此您的滑块将无法在其他任何地方使用。仅当您只想通过 CSS 摆脱滑块功能并且无法从主题设置中关闭自动滑块创建时才使用此代码。

.bx-wrapper .bx-controls-direction a{display:none;}
ul.bxslider li{display:none !important;}
ul.bxslider li:first-child{display:block !important;}

【讨论】:

  • 我不认为我想要那样...
  • @JoãoCruz 你需要知道如何编辑模板才能做到这一点。我建议您阅读有关 Blogspot 主题的内容。
  • 谢谢,这对我来说似乎有点不可能。我尝试联系它的设计者,并愿意购买完整版,但没有回答
  • 问题:在博客上发帖时,我说图像应该是小、中或其他,模板强制图像始终为默认大小。我无法弄清楚导致它的代码......
  • 你必须深入挖掘模板文件。
猜你喜欢
  • 2016-06-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-13
  • 2014-08-12
  • 2016-04-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多