2
Hello I would like to know exactly what the term string in CSS means and how it is used CSS?
2
Hello I would like to know exactly what the term string in CSS means and how it is used CSS?
1
The type of CSS data string represents a string of characters. Strings are used in various CSS properties, such as content
, font-family
, and quotes
.
Syntax:
The data type is composed of any number of Unicode characters surrounded by double (") or single quotation marks (').
Examples:
/ * Strings simples * /
"Esta string é marcada com aspas duplas."
'Esta cadeia é marcada por aspas simples.'
/ * Escapando caracteres * /
"Esta é uma string com \" uma aspa dupla com escape. "
"Esta string também tem \ 22 uma aspa dupla escapada."
'Esta é uma string com \' uma aspas simples com escape. '
'Esta cadeia também tem \ 27 uma cota simples de escape.'
"Esta é uma string com \\ uma barra invertida com escape."
/ * Nova linha em uma string * /
"Esta string tem uma quebra de \ Aline."
/ * String abrangendo duas linhas de código (essas duas seqüências terão saída idêntica) * /
"Um muito longo \
corda impressionante "
"Uma string realmente longa e impressionante"
Example of use with the property <content>
:
/* Valores <string> com caracteres especiais devem ser escritos */
/* com escape Unicode, por exemplo \00A0 para */
content: "prefixo";
/* Valores <url> */
content: url("http://www.example.com/test.png");
The CSS property content is used with the pseudoelements ::before and ::after to generate content in an element. Objects inserted using the content property are anonymous overwritten elements.
Browser other questions tagged css css3
You are not signed in. Login or sign up in order to post.
In any language, a string is a text (at least I’ve never heard of one that has a different meaning), usually delimited by
'
or"
. If you want an example:background: url('caminho/minha imagem.png');
orcontent: ' uma string'
– Costamilam
hello @guilhermecostamilam so from what I understand string is the word fika between the " quotes 'I’m right ? '
– Danilo rodrigues
Yes, at least in most languages. Some have other options, for example in javascript
"Isso é uma string"
,'isso também'
\
and this also``, the latter allowing interpolation– Costamilam
This is a simple explanation, besides a text, a String is a type of variable, which is actually a class. But this does not apply in CSS I believe
– Costamilam
thanks man! @Guilhermecostamilam
– Danilo rodrigues
The <string> data type is composed of any number of characters enclosed in double quotes ( " ) or single ( ' ).
– user60252
Could [Dit] give the context of where you saw the term being used? It would be better to ensure that the answers apply to what actually originated doubt.
– Bacco
@Bacchus as you suggest ? on the question ?
– Danilo rodrigues
Maybe for an excerpt and a link like "I read on the site such (linked to the site, if applicable) this phrase: ...(insert here).... In that context, what expression means string?" -
– Bacco