Instead of the top
and right
CSS properties, I'd like to use inset
to position the element.
For example, the following code places the element to the top right corner:
.top-right {
top: 0;
right: 0;
}
How would you achieve the same using the inset
property? I have tried using different ways and can't figure it out.
Although I set both top
and right
to 0 with inset
in the following example, it doesn't work:
.top-right {
inset: 0 0;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…