Robimo great letters in css styles with multiple pseudo-elements. How to create all great letters in css How to create the first letter of great letters
Hello, readers of this blog. Today, I'll tell you about those, how you can use css to grow all the great letters. Obviously, for whom you can turn on Caps Lock and write the necessary text, but also use the primitive method. And why do you need to see an okremy paragraph in an already prepared article?
Robimo in css all letters are great
For whom is the power of text-transform, like, as you already guessed, transforming the text. The new one has the same meaning:
- lowercase - all text is displayed in small letters
- uppercase - all words become great (those that we need)
- capitalize - the first letter of the skin word appears great
Axis, vlasne, and everything you need to know. Lose your mind, as if turning to the necessary element. Let's imagine such an example: you need the fifth paragraph of the article to work out all the great letters. I how can I sell?
How to get to the required element?
As you know, the paragraph is created behind the help of a paired html tag, the whole place of which becomes a paragraph. It’s too much to set a new style class for the new one:
Now we can move through the css language to any particular paragraph without bumping into others. You can do it like this:
uppercase-letter(
text-transform: uppercase;
}
The best way to do it, if you need to see a fragment in an okremіy statt. And yet, on all sides, the songful text in great letters is to blame. In this case, it’s easier to place a block in the template file so that you don’t have to write another word.
And you may need to see another paragraph in the skin article for additional css in great letters. Then give you another option. Find the block that will have the article return to another paragraph after the helper pseudo-class nth-child. For each example, we have a block of articles with a class article.
Article p:nth-child(2)(
Text-transform: upper case
}
Like a bachite, for a specific skin condition, you need to make your own decision. Most importantly, keep in mind the power of text-transform, as it changes the case of the letter.
It is not recommended to use the spelling of vikoristovuvaty to introduce the text in such a way, because it will greatly aggravate yoga, but it is possible to see especially important fragments.
Today we rose the power of text-transform. Subscribe to the blog to see new articles.
In HTML, font size plays an important role. Vіn allows you to respect the respect of the koristuvach for important information on the side of the site. If we want to be important, not only the rozmіr litter, but its color, comradeship and navit sіmeystvo.
Tags and attributes with html fonts
Mova hypertext is a great set of tools for working with fonts. Even the same formatting of the text is the main tasks of html.
The reason for the creation of the HTML movie was the problem of the browser's text formatting rules.
Let's take a look at the tags that are selected for work with fonts in HTML and their attributes. The main one is the tag . For additional value of this attribute, you can set a number of parameters in the font:
- color - set the color of the text;
- size – font size for smart units.
Positive value of attribute 1-7 is supported.
- face – tag for setting the font family in the text, as it will be tag in the middle of the tag . Pіdtremuєtsya vіdrazu kіlka znachen, pererahovanih through coma.
The text is formatted too much, it is ruffled between the parts of the paired font tag. Reshta the text is displayed in a standard font, we will insert it behind the lock.
Also, html has a number of guy tags that specify only one formatting rule. Before them one can see:
- - Set html bold font. Tag according to diї similar to the front;
- - Rosemary is larger than the one installed for locking;
- - Smaller font size;
- - Pohily text (italic). Youmu analog tag ;
- - Text z podkreslennyam;
- Baptisms;- - the text is rendered less in lower case;
- - In the upper register.
Great text
Bold text
Bold text
More than great
Less than great
Italics
Italics
Z under the chair
christening
Mobility attribute
There are more ways to describe the description tags, how to change the font in html. One of them is the insertion of the universal style attribute. For additional meaning of power, you can set the font style:
1) font-family - the authority determines the font family. It is possible to re-rahuvannya kіlkoh value.
Changing the font in html on the next value will be, as the previous homeland is not installed in the operating system of the coristuvach.
Writing syntax:
font-family: fontname[, fontname[, ...]]
2) font-size - sets the size of the font from 1 to 7. This is one of the main ways to make the font bigger in html.
Writing syntax:
font-size: absolute size Visual size | value | vіdsotki | inherit
Font size can also be set:
- In pixels;
- In absolute terms ( xx-small, x-small, small, medium, large);
- At vіdsotkah;
- U points (pt).
font-size:7
font-size:24px
Font-size: x-large
font-size: 200%
font-size:24pt
3) font-style - sets the writing style of the font. Syntax:
font-style: normal | italic | oblique | inherit
Value:
- normal - normal writing;
- italic - italic
- oblique - bold font to the right;
- inherit - the decline of the writing of the Batkiv element.
An example of how to change the font in html for additional power:
font-style:inherit
font-style:italic
font-style:normal
font-style:oblique
4) font-variant - translate all great letters into great ones. Syntax:
font-variant: normal | small caps | inherit
An example of how to change the font in html for authority:
font-variant:inherit
font-variant:normal
font-variant:small-caps
5) font-weight - allows you to set the weight of the written text (weight). Syntax:
font-weight: bold|bolder|lighter|normal|100|200|300|400|500|600|700|800|900
Value:
- bold - sets the html font to bold;
- bolder - fat is normal;
- lighter - less than normal;
- normal - normally written;
- 100-900 - set the font size in numerical equivalent.
font-weight:bold
font-weight:bolder
font-weight:lighter
font-weight:normal
font-weight:900
font-weight:100
Authority of font and color of html font
Font is another container power. In the middle of it, it combined the significance of a number of authorities, recognition of the change of fonts. Syntax :
font: font-size font-family | inherit
Also, as a value, fonts can be set, which are chosen by the system in the writings of various control elements:
- caption - for buttons;
- icon - for icons;
- menu - menu;
- message-box – for dialogue windows;
- small-caption - for small caption elements;
- status-bar - the font of the row will become.
font:icon
font:caption
font:menu
font:message-box
small caption
font:status-bar
font:italic 50px bold "Times New Roman", Times, serif
In order to set the color of the font in HTML, you can change the power of color. It allows you to set the color as an additional keyword, as well as for the rgb format. And also look at the sixteenth code.
Drop cap (inserted into the text of the initial letter) - the first letter of the paragraph, which has a larger expansion, the lower one, and is placed so that the upper letter is on the same line as the first row of the paragraph. On the image you can see the butt of the letter embedded in the text.
Speaking of which, WordPress has a special plugin (wordpress.org/extend/plugins/drop-caps) that allows you to automatically embed into text (and move down) capital letters. Miraculous! However, you don’t want to tweet the plugin (I’m sorry, you don’t want to), and you don’t need to create a drop cap for more posts, and, perhaps, in some singing world?
Good news: in order to create great letters, you do not need to stop the plugin, all that is needed is css and the span tag. Open your css file and add the following code:
Span.dropcaps ( font-family:Georgia, serif; color: #ccc; font-size: 46px; float: left; font-weight: 400; line-height: 1em; margin-bottom: -0.4em; margin-right : 0.09em;
Like so. Obviously, you need a style that matches your design and text. For example, the power values: font-size, margins and line-height will need to be chosen according to your design and text.
span tag
In order to make the style zastosovuvavsya to the capital letter of the text, it is necessary to "light up" the head letter in the span tag and write the appropriate class.
A
Pseudo-element:first-letter
You can also style the first character in a text with the help of a pseudo-element: first-letter . However, before the pseudo-element: first-letter, it is possible to encircle a number of authorities: the purpose of authority is connected with a font, color, ash, borders, fields and steps. Another thing to note is that the :first-letter pseudo-element is not practical in older browsers.
P:first-letter ( font-family:Georgia, serif; color: #ccc; font-size: 46px; float: left; font-weight: 400; line-height: 1em; margin-bottom: -0.4em; margin -right: 0.09em;
Axis, vlasne, a couple of editing methods great letters for help with CSS.
The letter is great, vіdpovіdno to vyznachennya, - the element of the text, which is the zbіlsheniy at rozmіrі vіdnosno Practically in all movs from the great litera, speech begins. And the design of the beginning of the paragraph with a great letter, as you can see, allows you to structure the text and make it easier to breathe. If an Internet page is being made out, the text can be spelled appropriately up to the likeness of the author and the rules of the Russian movie. Also, this design can be "automated" by a way of introducing the same "commands" into the file with the css extension - the style table - or add your HTML file with the style. CSS should sound like an addition to HTML, so that you can quickly change the same design elements in the usual text.
This is especially relevant, as the site has hundreds of pages and making changes to the skin of them is a laborious process.
If you use css, capital letters on the cob of a skin paragraph can look like a special rank. For example, introductions in html without round bows of lower guidance code allows for text that is formatted with the “r” tag, the capital letter - first letter - large - 220% of the standard size, yellow color - the value color and yellow, according to the text – Georgia versus batangche.
(<) style(>)
p: first-letter (font-family: Georgia; font-size:220%; color: yellow;)
(<)/style(>)
You can take away the garni of the great letters, as if creating an authoritative font in looking at the pictures - on the skin letter of the picture, for example, in the old Russian chic Gothic style. Їх can be painted in Todі in the necessary places on the place of the great letter, you can insert the code without round arches (<) img src=”ссылка на место, где лежит картинка”(>). Additional attributes will be heigh and width - the width and height of the image, which can be set in pixels for harmonic alignment with the text. Example: (<) img src=”ссылка на место, где лежит картинка” heigh=12 px width=6px(>). Round temples< и >tidy up.
Since you don’t have the ability to paint the alphabet on your own, then a large letter can be designed with additional fonts, available for free access on Google (split Fonts) or other search engine systems and resources. For which vision guidance, the code should be formatted like this:
(<) style(>)
p (font-family: batangche; font-size:93%;)
p: first-letter (font-family: Kelly+Slab; font-size:220%; color: blue;)
(<)/style(>)
(<)link href="http://fonts.googleapis.com/css?family=Kelly+Slab&subset=latin,cyrillic" rel="stylesheet" type="text/css" (>).
The "Google" service allows you to choose the one or the other and hopefully you are ready to send it for insertion into HTML or CSS. Thank you for your respect, that it is necessary to select a group of fonts - Latin or Cyrillic, tk. May all Latin fonts not work with Russian text. At the moment, the Poshukov system has about 40 views on a cost-free basis.
A great letter or a great antipode can be styled with the help of the power of the CSS-text transform. If you put the value text transform: none in the style sheet, the text will look the way you write it. To translate all the letters in the ordinal case, it is necessary to set the text transform: lowercase value through the double case, and for the great case - uppercase. The setting for the text transform: capitalize value is capitalize so that the letter will be large on the cob of the skin word.
Let's change the text of the element into great or great symbols. If the value is entered as none, the case of the output text will be changed.
short info
Appointment
Description | Butt | |
---|---|---|
<тип> | Specify the type of the value. | <размер> |
A&&B | The value may be displayed in the specified order. | <размер> && <цвет> |
A | B | Please indicate that you need to choose only one value from the proponations (A or B). | normal | small-caps |
A || B | Skin meanings can be conquered independently or together with others in a sufficient order. | width || count |
Group of values. | [crop || cross] | |
* | Repeat zero or more times. | [,<время>]* |
+ | Repeat one or more times. | <число>+ |
? | Assignment type, the word chi group is not obov'yazkovim. | inset? |
(A, B) | Repeat no less than A, but no more than B times. | <радиус>{1,4} |
# | Repeat one or more times through whom. | <время># |
Value
capitalize The first symbol of the skin word in the speech will be great. Other symbols do not change their appearance. lowercase Uсі characters and the text becomes small (lower case). uppercase Uсі characters become great in the text (upper case). none Do not change the case of characters.
Pisochnytsia
Winnie-the-Pooh, never mind a little more, especially the year of the eleventh wound, to the one who at that hour had already retired, and offended without thinking to start. And, obviously, I’m terribly healthy, chirping that the Rabbit is taking away cups and plates.
div (text-transform: capitalize;)
Butt
Cultural monument Serednyovichchya
The Amazonian lowland unfailingly takes a small supply of intestines and dogs, and Hajos-Baya is famous for its red wines.
The result of this butt of testimony in fig. 1.
Rice. 1. Stuffing the text-transform text-transform
Object Model
Object.style.textTransform
Specification
Skin specificity to go through the stages of hibernation.
- Recommendation (Recommendation) - the specification has been praised by the W3C and is recommended as a standard.
- Candidate Recommendation ( Possible recommendation) - a group that conforms to the standard, is satisfied, as if it were supporting its goals, but it needs additional help from the retailers to implement the standard.
- Proposed Recommendation ( Promoted recommendation) - at which stage the document is submitted to the W3C Advisory for residual solidification.
- Working Draft (Working Draft) - a larger mature version of the blueprint after discussing that amendments for a better look.
- Editor's draft ( editorial blackie) is a draft version of the standard after the editors have made changes to the project.
- draft ( Chernivets specifications) is the first black version of the standard.