Transforming Jade into HTML and CSS

I am working on converting some Jade code into HTML. Everything is going smoothly except for the hover effect, which I can't seem to figure out.

Here is the Jade code I am trying to convert: http://codepen.io/jzhang172/pen/Nqevge

My progress so far: http://codepen.io/jzhang172/pen/zGydZv

*{
transition: all 250ms ease-in-out;
}
.container{
position: absolute;
transform: translateY(-50%) translateX(-50%);
top: 50%;
left: 50%;
}
.block
{
height: 100px;
line-height: 100px;
text-align: center;
font-family: 'Playfair Display', serif;
}
.block .citation
{
font-size: 25px;
line-height: 35px;
}
.block .author
{
font-family: 'Roboto', sans-serif;
color: #838eca;
text-transform: uppercase;
font-size: 10px;
letter-spacing: 2px;
line-height: 35px;
transform: translateY(-50px);
opacity: 0;
}
.third
{
position: relative;
}
.third .citation{
transform: translateX(0);
}
.third .author
{
bottom: 10px;
position: absolute;
right: 0;
opacity: 0;
}
.third .author:hover .citation
{
transform: translateX(-70px);
    }
.third .author:hover .author{
right: -50px;
opacity: 1;
color: #ea8273;
    }
<div class="container">
<div class ="block third">
    <p class="citation">"Guess what. A quote."</p>
<p class="author"> - and the author -
</p>
  </div>
</div>

Answer №1

Utilize Jade's integrated feature to accomplish this task

To achieve this, simply execute :

Run the command jade "filename.jade" within your file directory to generate a .html file.

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

How to simultaneously run an application and install an NPM package

Is there a way to automatically install npm packages in Node.JS when using require('package') so that it doesn't throw an error? Having this feature would save us the trouble of running npm i package for every single package we need. ...

fullpage.js: the content exceeds the height limit

I am currently working on customizing the jquery script fullpage.js for a website built on the French CMS "SPIP" (). This script is used to create a one-page website with both horizontal and vertical navigation. However, I have encountered an issue with ...

Variable Returned by AJAX

I am attempting to send a variable using a select box via POST method, then use AJAX to submit the data and finally leverage that variable on the original page to update SQL queries. Below is the code snippet I currently have: <script type="text/j ...

What could be the reason my spin animation is only triggered once upon button press?

Every time the submit button is clicked, I want all the images to spin. However, this rotation effect only works the first time the button is pressed, until the page is refreshed. I have used jQuery to add and remove a class from the images when the button ...

Show only the image source (img src) and do not display the audio and video sources using jQuery

In my code, I need the following conditions to be met: when an image is posted from the backend, the video and audio sources should automatically hide; when a video is posted, the image and audio sources should hide; and when an audio file is posted, the v ...

Tips for overflowing an image within an Ionic toolbar

I am attempting to adjust the image overflow within the toolbar using the following code: ion-header { background: var(--ion-color-primary); ion-toolbar { --padding-end: 30px; --padding-start: 30px; --min-height: 100px; ion-avatar ...

Modifying the default actions of Material UI components: A step-by-step guide

In my project, I am using materialUI to showcase an Expansion Panel. Here is the code snippet: import React from 'react' import ExpansionPanel from '@material-ui/core/ExpansionPanel'; import ExpansionPanelSummary from '@material-u ...

Optimizing HTML5 metatags and styles for a mobile application

As a C++ developer who has recently delved into using HTML5 for my mobile applications, I am in need of guidance when it comes to fine-tuning my meta tags. While I do have some knowledge in web programming, there are still gaps in my understanding. I am s ...

What is the best way to implement padding for two DIVS on a screen utilizing VH and VW units to ensure they fill up the

I am currently working on a layout with two columns spanning across the page. I need to add some padding around the text in each column so that it sits nicely in the middle. I have been trying to adjust the div width and use wrappers, but something seems t ...

Form Rolling Over

I recently updated the navigation bar on our pending site by incorporating styled hyperlinks. Initially, one of these hyperlinks directed to PayPal, but due to security concerns, I had to replace it with an encrypted button instead. The challenge I' ...

Prevent page from rendering until image loads in JavaScript event

I have a vanilla Javascript function that sets the src attribute of an image to a data-uri. Within the function assigned to the onload event, I am attempting to display the progress of various preparations on the page, which could potentially take some tim ...

Difficulty in retrieving list elements from Flask template variables in JavaScript

Within my JavaScript code, I have a function: function functioncalled(){ var result = 1; var activityID = {{ mynames[result][8] }}; console.log(activityID); } The variable mynames represents a list of lists in my Flask template. However, the code above ...

Switch the position of the bootstrap dropdown menu to a different side

How can I move the Bootstrap dropdown menu to the left side, as shown in the screenshot below? Disregard the color differences in the code snippet and screenshots. https://i.sstatic.net/nrgHF.png https://i.sstatic.net/d24He.png <head> ...

Is there a way to create a personalized right-click context menu that displays dual links to a specific page on my website?

I want to create a custom right-click menu for users with two choices: Contact (link: Contact Us) Support (link: Support Page) <html> <head> <script type="text/javascript> if (document.addEventListener) { // IE >= 9;other br ...

How do you manage conditional formatting within HTML forms?

On one of my HTML pages, I am using the following code snippet: {% for bet in recent_bets %} {% if bet.status__name == "Won" or bet.status__name == "Half Won"%} <div class="container col recent-form_col bg-success" data-toggle="tooltip" da ...

What is the recommended Vue js lifecycle method for initializing the materialize dropdown menu?

https://i.stack.imgur.com/cjGvh.png Upon examining the materialize documentation, it is evident that implementing this on a basic HTML file is straightforward: simply paste the HTML code into the body and add the JavaScript initializer within a script tag ...

Apply a different color to every other header using the nth-child selector

I'm attempting to create alternating color headers without defining multiple header styles. I've opted to use the nth-child selector for this purpose, but I'm having trouble achieving the desired colors. JSFiddle: http://jsfiddle.net/CRh6L/ ...

Adjusting the size of the snap increments

When using gridstack, I have the ability to resize my widgets. However, I've noticed that when dragging on the widgets' handles, they snap to specific sizes, which seems to be a fixed amount. If I wanted to set the widget's size to something ...

Accordion within an Accordion that can be collapsed

Are you familiar with the toggle effect in Bootstrap? When you click on Group 1, it toggles, and when you click on Group 2, Group 1 collapses. Here is an example: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">< ...

I am interested in turning a div to complete a full 360-degree rotation

I am working on a layout where I have a square and inside it, a circle. The square is positioned absolutely and the circle is positioned relatively, centered within the square. However, when I rotate the circle using the rotate property, it loses its cente ...