Is there a way for rainyday.js to utilize a CSS background image as its background?

I have a simple website with a fixed, full-sized background set using CSS. I am trying to incorporate rainyday.js to create a rain effect over the entire site, including the text.

Currently, I am only able to get rainyday.js to display rain over a small section by overlaying another background image. It seems to be creating a separate 'background' and using that instead.

I found a potential solution here, but I am confused about how to implement it.

If you are interested, you can find the rainy day code here.

Thank you!

HTML:

<!DOCTYPE html>

<html lang="en>
<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">

    <title>Safe House</title>

    <link href="index.css" rel="stylesheet">

</head>

<body>

    <div id="yes">
        <div id="maindiv">
            Safe House
        </div>

        <div id="secondarydiv">
            <p>noun</p>

            <p>1.</p>

            <p>a dwelling or building whose conventional appearance makes it a
            safe or</p>

            <p>inconspicuous place for hiding, taking refuge, or carrying on
            clandestine activities.</p>
        </div>
    </div>
</body>
</html>

CSS:

@import url(http://fonts.googleapis.com/css?family=Coming+Soon);

#maindiv {
      text-align: center;
      font-family: 'Coming Soon', sans-serif;
      font-style: italic;
      color: white;
      text-transform: uppercase;
      font-size: 10em;
      font-weight: 700;
      text-transform: uppercase;
      text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

#secondarydiv{

    font-family: 'Coming Soon', sans-serif;
      font-style: italic;
      color: rgba(255, 255, 255, 0.7);
      text-transform: uppercase;
      text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
      font-size: 1.5em; 
      font-weight: 700;
      text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
      margin-left: 300px;
}

#yes {
    margin-top: 150px;
}

body { 
  background: url("images/bg.jpg") no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

p {
    margin: 0;
}

Answer №1

The author is currently in the process of working on it. For more information, you can visit https://github.com/maroslaw/rainyday.js/issues/95. Feel free to join the discussion with others in that issue ticket and even participate in adding this exciting new feature!

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

Triggering onClick without interfering with its populated variable

I'd like to add the following code snippet to my document: $('#myDiv).append("<div id='myDiv2' onclick="+extElementConfig.onClickDo+">Do</div>"); The code above uses an object with properties to populate the onClick attrib ...

What impact do negative positioning have on CSS elements in terms of responsibility?

Just diving into CSS and I have a question to pose: Is it considered good practice to utilize negative positioning in CSS? Are there potential compatibility issues with browsers like IE7 and IE8? What is your suggestion? #example-bottom { position: relat ...

Stopping a div from causing the parent table's width to increase

I've encountered an interesting challenge with a project I'm working on. I need to inject markup into pages that I don't have control over, specifically within tables. The issue arises when my injected div causes the parent table to expand u ...

Encasing the bootstrap dropdown menu and trigger within individual parent divs for a tidier appearance

Is it possible to toggle a bootstrap dropdown when it is wrapped in another div by using attributes such as data-target or aria-labelledby? I have seen examples where data-toggle="dropdown" and class="dropdown-menu" are siblings. An example of what I am r ...

Reactstrap: Is it necessary to enclose adjacent JSX elements within a wrapping tag?

While working on my React course project, I encountered an issue with my faux shopping website. The error message that keeps popping up is: Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...& ...

Using ng-class directive with condition in AngularJS

Here is a unique pop-up that allows users to encode item information. https://i.sstatic.net/sn9QZ.png I need to implement a feature where, if both the Foreign Currency and Conversion Rate fields have values, the Amount should be calculated by multiplying ...

Can you explain how to retrieve the header value from ng-table?

Is there a way to retrieve the table header for each column from JavaScript? When I call tableTest, it only returns data of each row, not the header names like 'name' and 'description'. Is there a method like tableTest.data-title to acc ...

Which is the best framework to transform a NextJS website into a desktop application: Electron, React-Native, or React-

After recently mastering ReactJS, I am currently utilizing it to create an application with NextJS. My goal is to make this application available as a desktop version as well. I have been introduced to Electron, React-Native, and React-Desktop, but I am u ...

What is the cost associated with using the require() function in an Express.js application?

I have a web application built with Express.js that serves one of my domains. The structure of the app.js file is as follows: var express = require('express'); var app = express(); // and so on… To incorporate one of my custom functions in t ...

What is the best way to stop "a" style from affecting a hyperlink?

I'm facing a challenge in designing a banner for my website that doesn't involve using an image. This banner also needs to be clickable as it will serve as a link. Is there a way for me to prioritize the CSS styling of my div over the default "a ...

What is the best way to retrieve data from a form on the server?

I'm currently working on a form and trying to figure out how to submit its contents to the server upon submission. I came across a similar question on another platform that suggested using a POST request, but I'm unsure of how to implement it. He ...

Connect the AngularJS data model with a Foundation checkbox element

I am attempting to link a model (a boolean value) to a checkbox created with Foundation (Zurb). I have created a small demonstration displaying the issue: http://jsfiddle.net/JmZes/53/ One approach could involve simply creating a function that triggers o ...

"Angular File Upload Made Easy with Drag-and-Drop Functionality and Cleverly Positioned

Encountering an issue with Angular File upload in conjunction with relatively positioned elements. The drop target is set to 100% width and height, absolutely positioned. While dragging a file over any non-relatively positioned element, the overlay functio ...

Utilizing a variable beyond the confines of the script tag

Is there a way to assign the value of my variable place to my variable address, even though they are not in the same script tag? I want to bind the value and utilize it for fetching data. When I log my variable place, I can see the address, but I am unsure ...

What is the method to obtain the dimensions of the browser window using JavaScript?

In my JavaScript code, I am trying to retrieve the browser window size and then set the size of a div element accordingly. I have two div elements that should adjust based on the window size. For example, if the window size is 568px, div1 should be 38% of ...

Utilizing a Static Image Path Prop in React JS: A Step-by-Step Guide

My Main Component import React from "react"; import TopModal from "./components/topModal"; // Passing productImage to the Child Component import productImage from "../../../../../../assets/images/juices.jpg"; import { makeS ...

Unlimited Lunch Options and Navigational Links

Looking for help with displaying the ul for MAINTENANCE and referencing specified classes from a CSS style sheet that are working elsewhere. However, the sub menu for MAINTENANCE is not showing up. Any suggestions? /* * Superfish v1.4.8 - jQuery menu w ...

Need help aligning a column class perfectly in bootstrap?

I'm currently learning Bootstrap 3 and I have some HTML code that looks like this: <ul class="row> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"></li> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"></li> .. </ul ...

What is the best way to delete a model from a Backbone.Collection?

How can I properly remove a model from a collection in Backbone.js? var item = new Backbone.Model({ id: "01", someValue: "blabla", someOtherValue: "boa" }); var list = new Backbone.Collection([item]); list.get("01").destroy(); After calling ...

Parsing improperly formatted JSON from an HTTP GET request can be done using either AngularJS or JQuery

Trying to decipher a poorly formatted JSON response from a remote server that looks something like this: //[ {},{} ] In my AngularJS code: $http.get('http://www.example.com/badjson') .success(function(data) { console.log(data); }) ...