Trường · Data Uri

Trường · Data Uri · image.dataUri. Phương thức tạo · Ví dụ

image.dataUri

Cài đặt trình tạo

Tạo dữ liệu để xem kết quả ở đây.

Tham số & Ví dụ

Generates a random data uri containing an URL-encoded SVG image or a Base64-encoded SVG image.

image.dataUri(options?: { width?, height?, color?, type? })
options
Options for generating a data uri.
options.width
The width of the image. Defaults to a random integer between 1 and 3999.
options.height
The height of the image. Defaults to a random integer between 1 and 3999.
options.color
The color of the image. Must be a color supported by svg. Defaults to a random color.
options.type
The type of the image. Defaults to a random type.

Ví dụ

"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%222672%22%20height%3D%22546%22%3E%3Crect%20…

Dùng dữ liệu tổng hợp trong môi trường kiểm thử.

Trình tạo liên quan

Khám phá kịch bản