Can I add text and special symbols in the style of the dotted line?
Like this picture
I know the dashArray
Related
In my Juptyter notebook I have many horizontal rules (generated in markdown cells) to break up the blocks of code, to create the horizontal rule I am using 3 underscores "___". For some reason, which I cannot figure out, the line sometimes appears as dark grey and sometimes as light grey.
In the screenshots below you can see the same "___" produces two differently colour lines.
Does anyone know the reason? Ideally i'd like them all to be the darker grey
It appears that the horizontal line color flip-flops each time you use it.
So the first line will be black, the second line will be gray, the third line will be black, etc.
Since I am using the horizontal line as a separator, I put the horizontal line before and after each section.
How can I have text in an HTML document so that it will be “there” in the PDF document (generated via wkhtmltopdf), but invisible when viewed or printed?
Constraints:
The text must appear at the right place, with the right size, because the purpose is to find the text with an automated tool and discover its co-ordinates and size on the page.
The solution must be to do with the text only, because I'm trying to keep this simply about CSS styles. Any “hide it under another element” doesn't address the problem, because there might not be any other element at those co-ordinates.
The solution can't be dependent on what's already on the page; I can't go inspecting the background elements on the page because I can't determine those dynamically. The text should be invisible in its own right.
The text must be findable with an automated tool (e.g. pdfgrep), which means wkhtmltopdf must place the text in the document file.
So a “display: none” style or “opacity: 0” doesn't work, because that makes the text not exist at all in the PDF document.
So I want to have an HTML document, place a text element “FOO” within that document with an inline CSS style, and process it through wkhtmltopdf; then, pdfgrep FOO should find the text, the text location and size should be correct, but the text should not show up in HTML, not appear when the PDF is viewed, and not appear when it's printed.
With a style of color: transparent; the text will be fully transparent on the page, but show up normally for any tool looking in the document for that text.
I.
The PDF syntax supports different "text rendering modes". These lets a PDF creating software (or anybody who authors a PDF with a simple text editor) render any text, regardless the chosen font, as
outlined only,
filled only,
outlined and filled,
neither filled nor outlined (invisible),
plus some more, which deal with clipping.
Here is the illustration from the PDF specification:
However, this is not supported by HTML or CSS (at least AFAIK). So your only option to get it done in a similar way is to...
...either set the background color in HTML to the same as the text color,
...or set the text color to transparent.
Then hope that htmltopdf will translate that into a PDF which represents the same...
II.
The following HTML code (essentially using style="color:transparent") works for me. You'll have to decide whether it fullfills your requirements completely:
<html>
<head></head>
<body>
<div style="color:transparent; background:red; border: 1px dashed currentColor;">
The color of this text is transparent/invisible. <br />
The background of this text is red.
<div style="background:blue; height:9px;"></div>
Above this text is a blue box with a height of 9px. <br />
This block is surrounded by a transparent border.
</div>
</body>
</html>
Then, when opening the PDF I cannot read any text lines, but I can select/mark/highlight them.
When running
pdftotext -layout my.html -
I see the following text:
The color of this text is transparent/invisible.
The background of this text is red.
Above this text is a blue box with a height of 9px.
This block is surrounded by a transparent border.
Make text colored with background color of your PDF (ex. white).
Is there a way to only select lowercase letters in a text area?
I want to change the color of lowercase letters in my text area to red and leave the uppercase letters as black.
You won't be able to do that using a textarea element. Because :
you'll need to wrap your lowercase letters using JS
strings in textarea are not interpreted as code but as text, so you'll have something like that "Hey, this is my text
What you can do :
use contenteditable attribute on an element to replace your textarea: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable
use JS to replace your element content, wrapping lowercase letter (on keyup event).
No. There is no method to do this using CSS.
I know how to change the background color of a textarea, but what about changing the background color of the text that users type into a text area?
For example, in HTML you can change the background color of a span of text using span tags, ie:
<span style="background-color: blue">Words with blue background</span>
...But what about the text that users type into a text field?
I need to do this for a form that I'm creating, so that users can clearly see spaces and returns they're entering as well as the characters they enter.
Can it be done using CSS?
No.
But there is the other way around.
Did you ever used editor in github.com? It's cool.
It uses javascript and <div> to control the style of each line of code.
And translate.google.com uses the same way.
I would like to give text shadow for my text using css3. Can anyone help me to apply text shadow. I tried using some online text shadow generators. But i couldn't able to get proper text shadow.
My site background color : white
My text color : #037ECC
What shadow color i should use to get proper text shadow?
Thanks
this really isn't complicated.
text-shadow: 1)px 2)px 3)px 4);
1) horizontal length
2) vertical length
3) blur radius
4) color hex/rgb/rgba
try this: http://css3generator.com/ or http://www.midwinter-dg.com/blog_demos/css-text-shadows/
what exactly do you have in mind?