Which property specifies the distance between the nearest border edge of the marker box and the main box?

WBOY
Release: 2023-08-31 16:49:06
forward
915 people have browsed it

Which property specifies the distance between the nearest border edge of the marker box and the main box?

In CSS, the "marker-offset" CSS property is used to specify the distance between the nearest border edge of the marker box and the main box. In CSS, a tag is a pseudo-element that references the bullet point of a list.

Here, we will learn to set the distance between the nearest border edge of the marker box and the main box.

grammar

Users can set the distance between the mark box and the nearest border edge of the main box according to the following syntax.

marker-offset: value;
Copy after login

Example

In the following example, we create an unordered list of different programming languages. Additionally, we use the "marker-offset" CSS property to set the distance between the marker box and the closest edge of the main box.

<html>
<head>
   <style>
      .list {
         marker-offset: 2em;
      }
   </style>
</head>
<body>
   <h3> Using the <i> marker-offset CSS property </i> to specifies the distance between nearest border edges of marker box and principal box in CSS </h3>
   <ul class = "list">
      <li> JavaScript </li>
      <li> HTML </li>
      <li> CSS </li>
      <li> C </li>
      <li> CPP </li>
   </ul>
</body>
</html>
Copy after login

Example

In this example, we use the "marker-offset" CSS property with an ordered list. We applied an offset of "2cm", which represents 2 centimeters.

<html>
<head>
   <style>
      .list {
         marker-offset: 2cm;
      }
   </style>
</head>
<body>
   <h3> Using the <i> marker-offset CSS property </i> to specifies the distance between nearest border edges of marker box and principal box in CSS </h3>
   <ol class = "list">
      <li> English </li>
      <li> Hindi </li>
      <li> Gujarati </li>
      <li> Marathi </li>
      <li> Urdu </li>
   </ol>
</body>
</html>
Copy after login

Users learned to use the "marker-offset" CSS property to set the distance between the marker box and the nearest edge of the main box.

The above is the detailed content of Which property specifies the distance between the nearest border edge of the marker box and the main box?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template