Let me tell you about the basic concepts and advantages of Markdown
Markdown is a markup language that can be written in a normal text editor. Through simple markup syntax, it can make ordinary text content have a certain format.
Markdown is a lightweight markup language with many advantages and is currently widely used by more and more writing enthusiasts and writers. Please don't be confused by marks and language when you see this. Markdown's syntax is very simple. There are no more than ten commonly used markup symbols. Compared with the more complex HTML markup language, Markdown is very lightweight and does not require too much learning cost. Once you are familiar with this syntax rule, it will have a one-time and for all effect.
Advantages of using Markdown
Focus on your text content instead of typeface and write with peace of mind.
Easily export HTML, PDF and .md files of your own.
Plain text content, compatible with all text editors and word processing software.
Modify your article version at any time, without having to generate several file versions like word processing software that can cause confusion.
Readable, intuitive, and low learning cost.
Markdown is a good markup language and is becoming more and more popular as an editor syntax. Bootstrap is a front-end framework . So the question is, Markdown's image markup such as: , which is usually converted to html on the page. How to add Bootstrap's image adaptive attributes to the image at this time.img-responsive?
like:
<img alt=”Wuhan Optical Valley” src=”http://cdn.tanteng.me/uploads/2016/05/guang-gu.jpg” class=”img-responsive”>
Just use js:
<scripttype="text/javascript">$(".content img").addClass('img-responsive');</script>Don't forget to add:
<metaname="viewport" content="width=device-width, initial-scale=1">
In this way, the pictures can be automatically scaled on the small screen of the mobile phone without affecting the adaptive layout of Bootstrap. The .img-responsive attribute is actually the attribute of blocking the image and max-width:100% of the attribute.
The above is the relevant knowledge about combining Markdown and Bootstrap to achieve adaptive attributes of pictures that the editor introduces. I hope it will be helpful to everyone!