I am looking to create an effect like this, but my website has a dynamic background-color
. Note that this example uses a white overlay, which does not work with different backgrounds.
p { width: 300px; overflow: hidden; height: 50px; line-height: 50px; position: relative; } p:after { content: ""; width: 100px; height: 50px; position: absolute; top: 0; right: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1)); }
What I was hoping to do was to set up a CSS opacity gradient. This sort of works, but the code is too messy. Looking at this second example, I could implement it in jQuery, but is there any way to do this entirely in CSS?
Related Posts:
- CSS reset – What exactly does it do?
- When to use margin vs padding in CSS [closed]
- SVG center horizontal and vertical line
- Can I change Bootstrap button color?
- Is it bad practice to comment out single lines of CSS with //?
- How to draw a half circle (border, outline only) [closed]
- CSS Circle with border
- Set parent style via child
- What is the proper way to display a logo with CSS?
- Responsive font size in CSS
- How to make a vertical line in HTML
- CSS Font Border?
- How do I change the background color with JavaScript?
- Why em instead of px?
- Vertical Align Center in Bootstrap
- Button Center CSS
- Centering a background image, using CSS
- How to change the cursor into a hand when a user hovers over a list item?
- not:first-child selector
- CSS: center element within a element
- what is a parse error and how do I fix it
- Bootstrap NavBar with left, center or right aligned items
- How to make the overflow CSS property work with hidden as value
- How to make a sticky footer in react?
- How to push a footer to the bottom of page when content is short or missing?
- Linking to a pdf file with html
- Can I add background color only for padding?
- Change TD border color with HTML or CSS
- Why adding version number to CSS file path?
- Hide text using css
- Changing the width of Bootstrap popover
- CSS background color not working
- Bootstrap transparent navbar
- jQuery toggle CSS?
- 100% DIV width is not really 100%
- CSS 3 slide-in from left transition
- CSS selectors ul li a {…} vs ul > li > a {…}
- Bootstrap scrollable panel
- CSS checkbox input styling
- Is there a CSS selector for elements containing certain text?
- How to place two divs next to each other?
- Background color in input and text fields
- CSS3 background image transition
- How to import Google Web Font in CSS file?
- CSS Equivalent of the “if” statement
- How to make div background color transparent in CSS
- Bootstrap Dropdown menu is not working
- Two divs side by side – Fluid display
- How do I set a background-color for the width of text, not the width of the entire element, using CSS?
- Dynamically change color to lighter or darker by percentage CSS
- CSS “margin: 0 auto” not centering
- Place input box at the center of div
- How can I align text directly beneath an image?
- How to select label for=”XYZ” in CSS?
- jQuery find element by data attribute value
- margin: auto is not centering
- Changing title to lowercase [closed]
- Suggestions for creative use of post format feature, or themes that use them well
- How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?
- Writing Clean WooCommerce Styles
- An unwanted inline style is added to my body tag
- Add stylesheets and js to template files when shortcode is used
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Child Theme files – what is needed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Remove inline styles from the_content?
- Older isotope portfolio rows shifting downward by 1 pixel on hover
- How to add styles set by user in the customizer
- What does generate .less file? [closed]
- Thumbnails appear to be zoomed
- Is there a way to specify an extra class for a post or page with no title?
- Why do I have stray bullet from
- how to hide submenus for the not active pages
- Why is the CSS horizontal alignment for divs inside div container not displayed in my WP Theme?
- I want to set global directory locations for my CSS and JS locations. How?
- change or add css to theme from plugin
- How can I selectively insert a header for my shop page in woocommerce? [closed]
- At a Loss on over Page Peel Plugin Customization [closed]
- Some doubts about WordPress handle the horizontal main menu visualization
- Trying to hide HENTRY (Author Meta Data) from a Post ID
- How to edit wc_get_template_part for archive products
- Probleme d’emplacement
- Need help removing block of white space between footer widgets and footer [closed]
- How to get rid of the bottom line in the navigation menu via CSS file?
- Customize CSS for “Swipebox ” lightbox
- Head section of the wordpress blog
- Creating custom post-listing templates in twentyseventeen child theme
- How limit the width of a fixed menu-bar on scroll?
- Where to find the html for WordPress site? [closed]
- Best use adding user generated JS/CSS to a theme with a plugin
- Pages in another language
- Using a style sheet for modern browsers and another for older browsers
- How to insert a clickable and fixed background [duplicate]
- Bought custom navigation menu from codecanyon, how to change feature.php?
- Woocommerce product page is not showing custom css [closed]
- Will the following code make my css deal with images in the optimum way?
- How to highlight current menu bar base on the URL?
- Interactive maps in wordpress
- Custom CSS File wont work on second Page
- Change a div background color on Post ID