Home Web Front-end CSS Tutorial How to make text display vertically in html? Summarize various methods to achieve vertical text style

How to make text display vertically in html? Summarize various methods to achieve vertical text style

Jun 05, 2017 pm 04:40 PM

Text Style is a collection of text settings that can be saved with graphics. These settings can include font settings and special effects. Text styles will be displayed differently in different software environments. Let’s share how to make text vertical in HTML? Summarize the various methods to achieve vertical text style

Must master CSS text styles

How to make text display vertically in html? Summarize various methods to achieve vertical text styleHow to make text display vertically in html? Summarize various methods to achieve vertical text style

Font family

serif font serif

sans serif font sans-serif
//generally for For compatibility, one of them must be added to avoid fonts that are not set in the current system

1. Vertical text setting method

1. js+css to achieve a three-dimensional button-type text vertical menu effect

This is a relatively good vertical menu. Menus with three-dimensional effects. Don’t think that those menus with three-dimensional effects are buttons. In fact, they are buttons decorated with JavaScript code. When the mouse is placed on it, there will be an obvious three-dimensional text effect. They are arranged vertically, and Can be modified to be horizontal.

The screenshot of the running effect is as follows:

How to make text display vertically in html? Summarize various methods to achieve vertical text style

2. 4 ways to arrange CSS text vertically

Sometimes, we need to arrange the text in a certain area of ​​the web page vertically. Of course, everyone is used to it horizontally. For vertical arrangement, I can’t find the idea for a while, haha , in fact, it is as simple as horizontal arrangement. Here are 4 methods to achieve vertical arrangement of CSS text.

The first method: Place the characters that need to be displayed vertically in span, and set the display attribute of span to block in CSS. However, this method is not recommended because it is a bit troublesome.

3. How to achieve vertical text arrangement with CSS

Although vertical text arrangement is not commonly used, it is not impossible. There is a demand in this area, but the existing CSS properties are not very supportive or have poor compatibility. There is indeed no suitable method to achieve this effect. Here is an effect achieved using javascript. You can learn from it. The effect is very good. Good. The code example is as follows:

4. How to arrange English vertically in table?

Those are from top to bottom, which is similar to clockwise; what I want are English words, which are read from bottom to top, which is equivalent to counterclockwise.

5. JS implements vertical navigation code that imitates FLASH effect

How to make text display vertically in html? Summarize various methods to achieve vertical text style

This is a navigation menu with Flash effect implemented by JS+CSS, arranged vertically. Good compatibility, written by friends from JavaScript Miaowei Classroom, welcome to test.

6. JS code to implement silver-gray vertical folding menu with 3D stereoscopic effect

How to make text display vertically in html? Summarize various methods to achieve vertical text style

This is a super cool silver-gray vertical multi-level folding menu that can be used on the left side of the web page. You can add a background to the menu yourself. There is a code reserved in the CSS. This is a relatively standard and classic one. The menu in the background management mode has a Div+Css structure, which conforms to standards and is easy to modify, which is quite good.

. Related questions and answers:

1. python - Tkinter Label How to change the text style in Label, for example, add Strikethrough

2. javascript - Are there any JS libraries that display text effects on images (non-synthetic)?

【Recommended related articles】:

1. A brief analysis of several ways to hide page text in CSS Summary

2. Introduction to how CSS beautifies the selected text

3. Detailed explanation of the usage of the writing-mode text layout attribute of css

4. h5 and css3 production with prompts Text input box

The above is the detailed content of How to make text display vertically in html? Summarize various methods to achieve vertical text style. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Vue 3 Vue 3 Apr 02, 2025 pm 06:32 PM

It's out! Congrats to the Vue team for getting it done, I know it was a massive effort and a long time coming. All new docs, as well.

Building an Ethereum app using Redwood.js and Fauna Building an Ethereum app using Redwood.js and Fauna Mar 28, 2025 am 09:18 AM

With the recent climb of Bitcoin’s price over 20k $USD, and to it recently breaking 30k, I thought it’s worth taking a deep dive back into creating Ethereum

Can you get valid CSS property values from the browser? Can you get valid CSS property values from the browser? Apr 02, 2025 pm 06:17 PM

I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That's like this.

Stacked Cards with Sticky Positioning and a Dash of Sass Stacked Cards with Sticky Positioning and a Dash of Sass Apr 03, 2025 am 10:30 AM

The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.

A bit on ci/cd A bit on ci/cd Apr 02, 2025 pm 06:21 PM

I'd say "website" fits better than "mobile app" but I like this framing from Max Lynch:

Using Markdown and Localization in the WordPress Block Editor Using Markdown and Localization in the WordPress Block Editor Apr 02, 2025 am 04:27 AM

If we need to show documentation to the user directly in the WordPress editor, what is the best way to do it?

Comparing Browsers for Responsive Design Comparing Browsers for Responsive Design Apr 02, 2025 pm 06:25 PM

There are a number of these desktop apps where the goal is showing your site at different dimensions all at the same time. So you can, for example, be writing

Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Apr 05, 2025 pm 05:51 PM

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

See all articles