简体   繁体   English

我想为 gitbook markdown 上的图像添加自定义样式

[英]I would like to add a custom style for images on gitbook markdown

This is the image code in my.md file:这是 my.md 文件中的图像代码:

![focal_point](../screenshots/Bildschirmfoto_Focal_Point.png)

website.css:网站.css:

img[alt="focal_point"] {
  width:  40%;
}
img {
  max-width:  100%;
}

This is in my book.json file According to the doc :这是在我的书中。json 文件根据 文档

{
  "name": "web-handbook",
  "version": "1.0.0",
  "gitbook": "2.5.2",
  "styles": {
    "website": "styles/website.css",
  },
  "structure": {
    "summary": "docs/SUMMARY.md"
  }
}

Are you looking to add new CSS styles to the image?您是否希望将新的 CSS styles 添加到图像中? You can add styles like so:您可以像这样添加 styles:

img[alt="focal_point"] {
  border: 5px solid red;
}

If that is not it, please elaborate on what you are trying to do.如果不是这样,请详细说明您要做什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想使用CSS在html中水平添加许多图像 - I would like to add many images horizontally in html using CSS 使用OOoWrite,我想添加自定义html元素 - using OOoWrite, i would like to add custom html elements 嘿,我有一个图像横幅左循环,但我想在悬停时向这些图像添加文本。 谢谢 - Hey, I have a banner of images trasitioning left on loop, but I would like to add text on hover to those images. Thankss 我想添加背景图片 - I would like to add a backgound image 我想在我的网络中放置一个三角形并用图像填充它 - I would like to have a triangle in my web and filled it with images 我想从绝对路径显示图像 - I would like to display images from an absolute path 我想要一些有关如何将名称与这些图像的中心对齐的帮助 - I would like some help on how to align the name to the center of these images mxgraph:我想添加一个按钮来禁用/启用图形和工具栏 - mxgraph: I would like to add a button to disable/enable the graph and toolbar 我想将 HTML 元素添加到 exupero 的 saveSvgAsPng 函数中 - I would like to add HTML elements to the exupero's saveSvgAsPng functions 我想在我的 Angular 应用程序中添加一个删除按钮 - I would like to add a remove button in my Angular App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM