Use multiple text shadows:
text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;

body { font-family: sans-serif; background: #222; color: darkred; } h1 { text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff; }
<h1>test</h1>
Run code snippetExpand snippet
Alternatively, you could use text stroke, which only works in webkit:
-webkit-text-stroke-width: 2px; -webkit-text-stroke-color: #fff;

body { font-family: sans-serif; background: #222; color: darkred; } h1 { -webkit-text-stroke-width: 2px; -webkit-text-stroke-color: #fff; }
<h1>test</h1>
Also read more as CSS-Tricks.
Related Posts:
- How can I replace text with CSS?
- How to place Text and an Image next to each other in HTML?
- Align text to the bottom of a div
- Text wrapping around a div
- How to Add a Read-only Textbox With Text in it That Has a Button to Copy it?
- Test wrapping cutting words in half on my WP site [closed]
- How to style text in WordPress
- add css to only body text
- Specific text not affected by CSS style [closed]
- Woocommerce align prices and texts [closed]
- Change sidebar product category text color (woocommerce) [closed]
- Making a
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- How to place a text next to the picture?
- What is the difference between the selectors “.class.class” and “.class .class”?
- How do I horizontally center a span element inside a div
- Is background-color:none valid CSS?
- Responsive background image in bootstrap container
- How to make circular background using css?
- What is the proper way to display a logo with CSS?
- Align elements side by side
- margin-bottom not working
- How to position a table at the center of div horizontally & vertically
- CSS force image resize and keep aspect ratio
- In a bootstrap responsive page how to center a div
- Child themes CSS priority problems without using !important
- How to work with custom styles saved in theme option?
- Modernizr and WordPress – How can I add a CSS class to the html element?
- front-page.php stylesheet
- How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?
- How to Edit the Order of Global Colors in Elementor? [closed]
- WordPress Displaying Thumbnails Vertically
- Why do WordPress default themes specify fonts in so many places?
- CSS in child theme not getting loaded
- CSS ?ver=4.6.1 not updating
- Changing Font-Size based on specific Font thru javascript
- How to get child style.css to load last rather than second behind parent style.css?
- Do I have to use a WordPress specific CSS reset, or is a normal, Eric Meyer style CSS reset fine?
- Relative file paths in CSS when linking directly (not enqueuing)
- Remove Genericons Helper CSS from twentyfourteen theme
- How to make Custom Walker for wp_nav_menu() for materialize framework
- Use stylesheet from a different location
- Is there a filter for editor-style.css file?
- Custom CSS class or ID on menu items that have a Submenu
- Different ways to load child theme css
- Can you edit WP gutenberg block css without a plugin?
- Style internal links based on the tags of the linked post
- How to override Bootstrap css with my child theme css in wordpress?
- How to stop Gutenberg from outputting inline CSS for specific blocks?
- “Scattered” gallery
- WordPress adding inline style can’t remove it
- How to enable table overflow scroll? (especially order list table)
- How to edit the default icon of Add Media button?
- Faster fonts on mobile
- Reduce white space in twenty fourteen
- How to make WordPress using local CSS/Fonts/Scripts only
- How to know which order WordPress places CSS files?
- How to remove the gap on right side of webpage (using Bootstrap with WordPress)?
- WordPress CSS problems with controls
- Remove CSS & JS from
- Show class from css in format dropdown
- All of my custom Bootstrap styles are not working in my child theme!
- Aligning line made with CSS [closed]
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- Overwriting forced wordpress CSS styles [closed]
- How to add/insert a class to a sidebar in single.php?
- Customizing WP-syntax to get custom colors
- Sidebar missing from Homepage
- W3TotalCache and Javascript — what should go where, when?
- CSS not being applied
- 2 css files? Theme css file gets override by another css file that I can not edit
- WordPress sidebar content moving to bottom of page
- custom template display 3 columns
- Need to make sidebar responsive only when screen width is greater than 1024px
- Does anyone know how to make text fade in when scrolling down, that doesn’t require any plug-ins? [duplicate]
- Blog page and the Home page showing the same content
- WP Admin Bar transparent on some pages (.screen-reader-shortcut)
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- How to Compress Css/js code in wordpress and increase loading speed?
- How to Take Logo Out of Navigation Menu? [closed]
- @media applying globally and not separately for each screen width [closed]
- Make different border color gallery items
- How remove the white space between my menu and slider?
- WordPress site using unknown overriding css
- Header formatting works for safari but not chrome @media screen size technique on iphone
- Style Switching
- Adding a css style to the main nav menu in child pages
- Adding custom css to a theme depending on whether the admin user is logged in or not
- Adjusting post width according to the image size
- Background tiles not working in iPad2 but ok everywhere else
- To override CSS of parent theme
- Can’t override CSS with child theme
- [class*=”content”]:before css styles in TwentyThirteen [closed]
- How to use WordPress 3.8 back-end CSS in front-end?
- Enqueue MCE Editor CSS in admin page
- How to avoid problems caused by new block-library default CSS rules (wp 6.1.1)
- Grid problem on privew mode
- Disabling double vertical scrollbar and horizontal scrolling?
- Customize margin between paragraphs using the Gutenberg Style editor