• Resolved nate22

    (@nate22)


    Got it:

    <div style="background-image:url('<?php block_field( "image"); ?>'); background-size: cover;">

    • This topic was modified 5 years, 1 month ago by nate22.
    • This topic was modified 5 years, 1 month ago by nate22.
    • This topic was modified 5 years, 1 month ago by nate22.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nate22

    (@nate22)

    resolved…sorry about being the boy who cried wolf twice in a row (ie. fixing my own problems)

    • This reply was modified 5 years, 1 month ago by nate22.
    Plugin Author Luke Carbis

    (@lukecarbis)

    One of the things I like to do is include a range slider (from 0 to 100) for darkening the background image (or you could use the same technique for making the background image more transparent):

    
    <?php $alpha = block_value( 'background-darken' ) / 100; ?>
    <div style="background-image:url(<?php block_field( 'image' ); ?>); background-size: cover;">
        <div style="background-color:rgba(0,0,0,<?php echo $alpha; ?>); ?>
            <!-- content here -->
        </div>
    </div>
    
    • This reply was modified 5 years, 1 month ago by Luke Carbis.
    • This reply was modified 5 years, 1 month ago by Luke Carbis.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Image black as background CSS?’ is closed to new replies.