Raphael-Radar
Raphael-Radar copied to clipboard
Hello,how to set Raphael-Radar size?
Hello,I have run it successful, but I can not set it's size. It's width is 250px; height is 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you.
========================================
显示以下内容的翻译: Hello,I have run it successful, but I can not set it's size. Its width is 250px; height in 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you. 仍然翻译: Hello,I have run it successful, but I can not set it's size. It's width is 250px; height is 250px. I want to use 'rem' units. How can I do in a 'Html \css\ js ' project? Thank you. こんにちは、私はそれが成功し実行してきたが、私はそれがサイズだ設定することはできません。その幅が250ピクセルです。 250ピクセルで高さ。私は「レム」単位を使用したいと思います。どのように私は'Htmlの\ CSS\ jsファイル'プロジェクトで行うことができますか? ありがとうございました。
just change the values of 150,150 that is your width and height
@Coca-code I have not noticed this but what @jeraldkingn suggests seems to be correct.
@Coca-code Raphael itself does not seem to accept numbers in rem
for the size of canvas. Would this work for you:
- Create an element styled with
width: Xrem; height: Yrem
. - Get size of the element in pixel with JS.
- Initialize Raphael-Rafar with the size you got above.