告诉我标准如何规定字节的大小?
我在某处听说C有一个约定,一个字节只能是 8 位。但我找不到来源。
许多人习惯于使用char和CHAR_BIT对字节进行操作,但char不仅是 8 位的。
CHAR_BIT也具有误导性,因为这个宏常量似乎与字节的大小无关,它指的是char类型的位数。
通常需要通过void*逐个字节地浏览内存/对象。有人为此使用强制转换为char*,但这显然是错误的。例如,我对uint8_t*使用强制转换,但这可能也是错误的。
告诉我标准如何规定字节的大小?
我在某处听说C有一个约定,一个字节只能是 8 位。但我找不到来源。
许多人习惯于使用char和CHAR_BIT对字节进行操作,但char不仅是 8 位的。
CHAR_BIT也具有误导性,因为这个宏常量似乎与字节的大小无关,它指的是char类型的位数。
通常需要通过void*逐个字节地浏览内存/对象。有人为此使用强制转换为char*,但这显然是错误的。例如,我对uint8_t*使用强制转换,但这可能也是错误的。
任务是使这种类型的滑块跨浏览器。我应用转换+伪元素。一切似乎都很简单,但从某个地方出现了包装块的轮廓:
.wrapper {
width: 250px;
height: 180px;
margin: 50px;
border-radius: 30px 20px;
transform: skew(10deg, 5deg);
position: relative;
overflow: hidden;
}
.img {
width: 150%;
transform: translate(-20px, -20px) skew(-10deg, -5deg);
}
.wrapper:before {
content: '';
position: absolute;
left: 220px;
display: block;
width: 60px;
height: 200px;
border-radius: 20px;
background-color: white;
transform: skew(-20deg, -10deg);
z-index: 1;
}
.wrapper:after {
content: '';
position: absolute;
top: 160px;
display: block;
width: 250px;
height: 60px;
border-radius: 20px;
background-color: white;
transform: skew(-20deg, -10deg);
}
.arrow {
position: absolute;
width: 30px;
height: 40px;
background-color: red;
z-index: 2;
top: 135px;
left: 180px;
color: white;
transform: rotate(45deg) skew(0, 0);
border-radius: 5px;
cursor: pointer;
}
.arrow div {
font-weight: bold;
padding: 10px 0 0 7px;
transform: rotate(-45deg);
}
<div class="wrapper">
<img src="https://avatars.mds.yandex.net/get-pdb/33827/8ee85d23-431a-487b-8efb-d8f5fdd6bf29/s1200" alt="" class="img" />
<div class="arrow"><div>>><div></div>
</div>
这个循环是什么以及如何摆脱它?
而且,也许还有其他方法可以制作这样的滑块跨浏览器?
原始问题:https ://toster.ru/q/525769 注意:该问题已被 toster.ru 版主删除
与往常一样,这个问题的不寻常之处令我感兴趣,我将附上一个布局

开始SVG并得到了这个:
<?xml version="1.0" encoding="UTF-8"?>
<svg width="400px" height="400px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Red Hot Chilli Peppers Logo</title>
<defs>
<path id="a" d="m243.2 382.4c-74.8 0-135.5-60.7-135.5-135.5s60.7-135.5 135.5-135.5 135.5 60.7 135.5 135.5-60.7 135.5-135.5 135.5z"/>
<style>text {
font-size: 16px;
font-family: helvetica;
font-weight: 900;
text-transform: uppercase;
letter-spacing: 17px;
}</style>
</defs>
<text dy="20" textLength="1200">
<textPath xlink:href="#a">Red Hot Chilli Peppers</textPath>
</text>
</svg>
如何实现问题开头图片中文字逐渐出现的效果?