如何在.md文件中添加图像的高度和宽度

时间:2019-05-21 18:58:35

标签: markdown gatsby

嗨,我正在尝试为以下代码调整.md文件中图像的大小

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg)

我尝试了以下方法,但是没有用

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg){width: 200px}

![unsplash.com](./photo-1490474418585-ba9bad8fd0ea.jpg =200x200)

我想将图像调整为200px。任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:0)

您是否尝试过将HTML直接插入.md?

<!DOCTYPE html> <html> <head> <title></title> </head> <body> <form action="{% url 'dodajClanak' %}" method="post"> {% csrf_token %} <table border="1"> {{forma.as_table}} </table> <input type="submit" name=""> </form> </body> </html>

答案 1 :(得分:0)

您不能直接设置图像的样式,但是,一种解决方法是将图像括在div中。然后,您可以使用内联CSS或可以在全局CSS上引用的类在此div上进行大多数样式设置(大小和位置)。确保您还使用标准的html private ArrayList<String> setInterval(String start, String stop) throws ParseException { String strStart; String strEnd; ArrayList<String> arrayList = new ArrayList<>(); SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()); Date dStart = df.parse(start); Date dStop = df.parse(stop); Calendar cal = Calendar.getInstance(); cal.setTime(dStart); cal.add(Calendar.HOUR, 1); //minus number would decrement the days while (cal.getTime().before(dStop)) { strStart = df.format(cal.getTime()); cal.add(Calendar.HOUR, 1); strEnd = df.format(cal.getTime()); arrayList.add(strStart + " - " + strEnd); } return arrayList; } 标签,因为div内部的markdown不会被解析:

sentence = "study well for your future. study well for you. study well."
sentence_list = sentence.split(".")
length_of_sentence = [len(i) for i in sentence_list]
print(sentence_list[length_of_sentence.index(max(length_of_sentence))])