简体   繁体   English

TYPO3 Mask CE背景图片

[英]TYPO3 Mask CE background image

I'm trying to get a background image or color in a CE element in Mask extension. 我正在尝试在Mask扩展中的CE元素中获取背景图像或颜色。

This is what I get as out-put but no image and no background color? 这是我得到的输出,但是没有图像,没有背景色吗? What Am I missing forgetting here? 我在这里遗忘了什么? Seems all OK to me :) 对我来说似乎一切正常:)

 <div id="c71" class="csc-default">
<section class="test_one" style="background-image: url('fileadmin/_processed_/c/6/csm_pizza_uit_de_kleine_pizzajolly_pizzaoven_campegio_eb7fa491f7.jpg') no-repeat center center; background-size: cover;">
<div class="row wrap">
<div class="large-12 small-12 columns">content</div>
</div>
</section>
</div>
</section>

this is in my template: 这是在我的模板中:

<f:if condition="{data.tx_mask_achtergrond_afbeelding}">
 <f:then>
        <f:for each="{data.tx_mask_achtergrond_afbeelding}" as="file">

            <section class="<f:if condition="{data.tx_mask_class_name}">{data.tx_mask_class_name}</f:if>"

                    style="background-image: url('{f:uri.image(src: file.uid, treatIdAsReference: 1)}') no-repeat center center; {data.tx_mask_kleur_actergrond}; background-size: cover;">                 
                    <!-- if content CE than: -->
                    <div class="row wrap">
                        <div class="large-12 small-12 columns"><!-- content element here: text / button  -->content</div>

                    </div>
                    </section>
        </f:for>
 </f:then>
      <!-- if no background image than background-color and content CE-->
  <f:else>
  <section class="class-name" 
            style=background-color:"<f:if condition="{data.tx_mask_kleur_actergrond}">
                    {data.tx_mask_kleur_actergrond}
                    </f:if>
                ;">

                <!-- if content CE than: -->
                    <div class="row wrap">
                        <div class="large-12 small-12 columns"><!-- content element here: text / button  --></div>                      
                    </div>                  
                </section>
</f:else>
</f:if>
<section class="test_one" 
         style="background-image: url('fileadmin/_processed_/c/6/csm_pizza_uit_de_kleine_pizzajolly_pizzaoven_campegio_eb7fa491f7.jpg') 
                                  no-repeat 
                                  center 
                                  center; 
                background-size: cover;">

do you want only set the background image or do you want to set also the formating and positioning of the background image? 您是否只想设置背景图像还是要设置背景图像的格式和位置?
You start with background-image: but set all paramters as for background: 您从background-image:开始background-image:但是将所有参数设置为background:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM