未固定的响应式设计造型

时间:2015-10-19 09:51:28

标签: css image alignment href src

  

已更新!

每次我在横向屏幕设备上查看该页面时,我仍然面临同样的错误。

CSS:

f5 {
    text-transform: uppercase;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
}

about.us

<div class="containerpreview">
    <br>
         <f5>Check out our products</f5>
    <br>
         <f6>and Experience no-frills delivery</f6>
    <div style="margin-top:40px">
        <div class="buttoneshop"><a href="...">Eshop</a></div>
    </div>
</div>

有没有办法让间距更近?当我命令

text-transform: uppercase;

间距很好。

enter image description here

除此之外,有没有办法让hrc下的src内的图像居中?

enter image description here

CSS

.images_1_of_4 img {
    max-width: 100%;
    <!-- height: 200px; -->
    width: 200px;
    align: middle;
}

.img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
 }
.grid_preview {
    height: 200px;
}

shop.php

<div class="grid_1_of_4 images_1_of_4">
    <div class="grid_preview">
        <a href="..."><img src="..." alt=""></a>
    </div>
</div>

2 个答案:

答案 0 :(得分:1)

尝试将对齐text-align : justify;更改为text-align : left

或者,如果这不是您想要做的,letter-spacing是用于更改字母之间空间的CSS属性,word-spacing用于更改字词之间的空格

答案 1 :(得分:1)

正如其他用户建议的那样,考虑使用text-align : left在左侧强制对齐,您可能在包装元素上有text-align : justify;或在css的另一部分设置,如下面的示例所示。

https://jsfiddle.net/s5p9872t/

.f5 {
   text-align : justify;
    width: 250px;
}

.f5 {
    text-transform: uppercase;
    font-size: 30px;
    font-weight: bold;
    text-align: left;
}