JSFiddle для этого, чтобы увидеть HTML / CSS в деталях
Я думаю, что это соответствующий CSS:
ul {
list-style-position: inside;
list-style-type: circle;
padding-top: 16px;
padding-left: 8px;
padding-bottom: 5px;
}
ul li {
padding-top: 0px;
padding-bottom: 16px;
word-break: normal;
word-wrap: normal;
}
/*
How to center the bullet vertically with the content:
https://stackoverflow.com/a/31966278/421797
(You also have to wrap your li content in a span tag!)
*/
li span {
display: inline-table;
vertical-align: middle;
padding-left: 16px;
}
В конечном счете, я не знаю, почемукажется, что дополнительная строка отображается для длинной текстовой строки, когда вместо нее должно быть 2-3 разрыва строки.
Приведенный выше JSFiddle покажет CSS, который я использую.Это не отразит проблему, которую я вижу на iPhone SE:
Во всяком случае, я бы ожидал:
Empfänger
personenbezogener Daten
И все элементы списка имеют одинаковое поле от точки маркера, а точка маркера должна быть выровнена по вертикали с содержимым элемента списка.
/*
https://stackoverflow.com/a/3428477/421797
Makes sure the Browser isn't trying to perform its own magic.
Also,
You can debug this in the simulator by looking here for how to do that:
https://stackoverflow.com/a/43771390/421797
*/
@media screen and (max-device-width: 480px) {
body {
-webkit-text-size-adjust: none;
}
}
body {
padding: 20px;
padding-right: 5px;
margin: 0px;
}
#content {
padding: 0px;
color: #46484d;
background-color: white;
font-family: Helvetica, sans-serif;
font-size: 17px;
line-height: 27px;
letter-spacing: -0.24px;
}
p {
padding: 0px;
margin: 0px;
}
a {
color: #3d78fe;
text-decoration: none;
}
p.header {}
p.footer {}
ul {
list-style-position: inside;
list-style-type: circle;
padding-top: 16px;
padding-left: 8px;
padding-bottom: 5px;
}
ul li {
padding-top: 0px;
padding-bottom: 16px;
word-break: normal;
word-wrap: normal;
}
/*
How to center the bullet vertically with the content:
https://stackoverflow.com/a/31966278/421797
(You also have to wrap your li content in a span tag!)
*/
li span {
display: inline-table;
vertical-align: middle;
padding-left: 16px;
}
/*
How to choose different images depending on screen properties
https://www.html5rocks.com/en/mobile/high-dpi/
*/
ul.bullets {
list-style-image: -webkit-image-set( url("ovalCopy.png") 1x, url("ovalCopy@2x.png") 2x, url("ovalCopy@3x.png") 3x);
}
<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
<div id="content">
<p class="header">
Blahblahblah, I redacted this for our product in test.
</p>
<ul class="bullets">
<li><span>Datenkategorien</span></li>
<li><span>Zwecke der Datenverarbeitung</span></li>
<li><span>Empfänger personenbezogener Daten</span></li>
</ul>
<p class="footer">
Etwas unklar? <a href="getInTouch">Schreib uns.</a>
</p>
</div>