Utilize Bootstrap to allow a div's background to seamlessly spread into neighboring div elements

I am looking to create a visual effect where one splat of paint merges with another splat of paint.

I currently have 4 columns, each with a different splat background. Is there a way to make these backgrounds interact with each other to create a random splat pattern?

This is the desired outcome: https://i.sstatic.net/VbMh0.jpg

This is what has been achieved so far:

section#splat {
  background: #010318;
}

.tag-foto {
  background: url(https://i.sstatic.net/bevwr.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  width: 290px;
}

.tag-foto-2 {
  background: url(https://i.sstatic.net/yIwOh.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  width: 290px;
}

.tag-foto-3 {
  background: url(https://i.sstatic.net/8ledX.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  width: 290px;
}

.tag-foto-4 {
  background: url(https://i.sstatic.net/qwMFz.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  width: 290px;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="93f1fcfce7e0e7e1f2e3d3a7bda5bda2">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" />
<section id="splat">
  <div class="container">
    <div class="row">
      Title
    </div>

    <div class="row">
      <div class="col-md-3">
        <div class="tag-foto">

        </div>
        <p class="region-artista text-center">Text</p>
      </div>

      <div class="col-md-3 ">
        <div class="tag-foto-2">

        </div>
        <p class="region-artista text-center">text</p>
      </div>

      <div class="col-md-3">
        <div class="tag-foto-3">

        </div>
        <p class="region-artista text-center">text</p>
      </div>

      <div class="col-md-3">
        <div class="tag-foto-4">

        </div>
        <p class="region-artista text-center">text</p>
      </div>
    </div>
  </div>
</section>

Answer №1

I've showcased some key aspects of the mix-blend-mode feature.

Additionally, applying an inset box shadow that matches the background color can help to create a softening effect around image edges.

section#splat {
  background: #010318;
}

.tag-foto {
  background-image: url(https://i.sstatic.net/bevwr.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  aspect-ratio: 267 / 304;
  box-shadow: 0 0 32px 4px #010318 inset;
  mix-blend-mode: lighten;
  border-radius: 25%;
}

.tag-foto-2 {
  background-image: url(https://i.sstatic.net/yIwOh.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  aspect-ratio: 267 / 304;
  box-shadow: 0 0 32px 4px #010318 inset;
  mix-blend-mode: lighten;
}

.tag-foto-3 {
  background-image: url(https://i.sstatic.net/8ledX.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  aspect-ratio: 267 / 304;
  mix-blend-mode: lighten;
}

.tag-foto-4 {
  background-image: url(https://i.sstatic.net/qwMFz.png);
  height: 410px;
  background-position-x: center;
  background-position-y: center;
  aspect-ratio: 267 / 304;
  mix-blend-mode: screen;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e98b86869d9a9d9b8899a9ddc7dfc7d8">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" />
<section id="splat">
  <div class="container">
    <div class="row">
      Title
    </div>
    <div class="row">
      <div class="col-md-3">

        <div class="tag-foto">
          <img src="" alt="" class="sello-foto">
        </div>
        <p class="region-artista text-center">Text</p>
      </div>
      <div class="col-md-3">

        <div class="tag-foto-2">
          <img src="" alt="" class="sello-foto">
        </div>
        <p class="region-artista text-center">text</p>
      </div>
      <div class="col-md-3">

        <div class="tag-foto-3">
          <img src="" alt="" class="sello-foto">
        </div>
        <p class="region-artista text-center">text</p>
      </div>
      <div class="col-md-3">

        <div class="tag-foto-4">
          <img src="" alt="" class="sello-foto">
        </div>
        <p class="region-artista text-center">text</p>
      </div>
    </div>
  </div>
</section>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issues with Google fonts not displaying properly on WordPress site

I'm just starting out with Wordpress and I'm using the html5blank theme to bring in my stylesheets. However, I've run into an issue where the google fonts are not being applied on my wordpress site. In my header.php file, I have included th ...

Simplest Method to Update Content of 'DIV' Across Entire Website Simultaneously

Some DIVs on a website are typically static... For example, the footer of a page is usually consistent and should remain the same on all pages. In a website's CSS, you may have the following: .FooterDIV { Background: #FFFFFF; Color: #0000 ...

Styling for 'checked' state within an ngFor iteration

Each checkbox in my list is assigned to a different department, with each department having its own color. When a box is unchecked, only the border is in the color of the department. When checked, the background changes to the assigned color https://i.ssta ...

What can I do to prevent my HTML/CSS/jQuery menu text from shifting when the submenu is opened?

After encountering numerous inquiries regarding the creation of disappearing and reappearing menus, I successfully devised a solution that functions seamlessly on desktop and tablet devices. My approach involved utilizing the jQuery .toggleClass function w ...

Difficulty aligning headings in HTML

I'm puzzled by a strange 1px gap on the left of my h2 heading, which sits atop an h3. The font sizes are set to 40px for h2 and 12px for h3. Can anyone help me solve this mystery? Any assistance would be greatly appreciated! Thank you body { pa ...

What is the best way to eliminate the blue highlight on a button after it has been pressed and the original border has been

Is there a way to remove the blue border that appears when clicking on a button that doesn't have its original border? Here is the HTML code snippet: <div id="buttonholder" style="border 1px solid black"> <button id="previous">&l ...

What are the different approaches for creating a website that adapts to different screen sizes and devices

The popularity of responsive web design is growing rapidly. While many recognize Twitter Bootstrap as a top framework, there are other options worth exploring. Several impressive examples of responsive websites, such as Smashing Magazine and CSS Tricks, ...

Why is the ajax request in JQuery initiated before the code in beforeSend is fully executed?

I have encountered an issue with my code. I am trying to get a Reload.gif to start playing on my webpage before sending an ajax request to reload the data. However, the GIF only starts playing after the success function is called. Here is the timeline of e ...

What methods does a webpage use to track views and determine when content has been seen?

I am interested in learning about the code and mechanism that detects when a specific section of a webpage has been viewed (purely for educational purposes). For instance, on websites like StackExchange it tracks when someone has thoroughly read the "abou ...

Issue with Retrieving the Correct Element ID in a Loop with JavaScript Function

I'm in the process of developing a dynamic wages table with HTML and JavaScript to compute each employee's wage based on input from each row. In order to achieve this, I've utilized a loop to assign a unique ID to the total cell in every ro ...

PHP Generating random numbers

After stumbling upon this code online, I have a couple of questions: <? $seed = floor(time()/(60*5)); srand($seed); $item = rand(0,9); echo $item; ?> How can I modify this code to generate random numbers to the tenth place, such as 5.56, rather tha ...

Properly spaced website images

I'm trying to display my images side by side with a slight margin in between them. However, when I apply a `margin-right: 10px;` to each div, the last image doesn't line up properly with my title bar. Is there a way to create spacing between the ...

Unable to Upload Image to MySQL Database

I encountered an unidentified index error when trying to upload images. I added a check to prevent the error, but the images are still not being uploaded. I have tested with legitimate images, but nothing seems to work. I've been struggling with this ...

The communication factor that triggers the expansion of the mother element

I've been struggling with this issue for quite some time. Here is the challenge at hand: I am in the process of developing a library to streamline AJAX calls and neatly display error messages directly within a form. The dilemma: Whenever the messag ...

Ways to stop dropdown from closing when choosing a date in mat datepicker

Utilizing both Bootstrap dropdown and mat date picker in a drop-down menu presents an issue wherein selecting a date from the mat date picker results in the closure of the dropdown. Preserving the dropdown's visibility post-selecting the date is desir ...

Creating a stylish touch by connecting list items with a horizontal line in a menu

I have a Menu where each item has an image, and I am looking to connect those images with a horizontal line. <ul> <li> <a href="#" title="Item1"><img src="foo/bar.png"></a> </li> <li> & ...

Are you looking to analyze inputs and tally up any duplicates?

I am working on a form that requires users to input up to 20 1-4 character codes. My goal is to count each code entered and present the output in the following format: AB //entered once EFOO //entered once AACC x 2 //because AACC was entered twice into fo ...

Why does Material-UI TableCell-root include a padding-right of 40px?

I'm intrigued by the reasoning behind this. I'm considering overriding it, but I want to ensure that I'm not undoing someone's hard work. .MuiTableCell-root { display: table-cell; padding: 14px 40px 14px 16px; font-size: 0. ...

Python KeyError: Implementing a Strategy for Displaying Two Divs Side by Side Efficiently with Dynamic Data

media.py: http://pastebin.com/r1nxPzTQ This file contains a Python class with methods like __init__ and show_trailer(self). fresh_tomatoes.py: http://pastebin.com/bcdUYiiu It's a Python script that generates an HTML file and populates it using data ...

MUI Datepicker options for selecting dates

Is there a way to selectively enable certain dates and disable all others in the MUI Datepicker? For example, I need to only allow dates that are 7 days later or earlier to be selectable, while all other dates should be disabled. How can this be achieved? ...