![](/img/trans.png)
[英]How to put svg+xml into css style document with out encoding it into base64?
[英]Knitr, convert to base64 and CSS style
對於這個很棒的庫(和HTML),我是一個新手,所以這可能是一個菜鳥問題。
我有一種無法解決的情況-如何在圖像中添加一些CSS樣式,同時也在base64中對其進行編碼? 這是我的Rmarkdown文件(我傳遞給knit2html
)中的代碼-
<img src="SomeImage.png", width = "75%", border = "2"> # converts to base64 with width and border correctly applied
<img class="displayed", src="SomeImage.png"> # does not convert to base64, points to local path with style correctly applied
有沒有辦法在應用樣式的同時將第二個轉換為base64? 還是我做錯了什么?
SessionInfo
,如果需要-
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)
other attached packages:
[1] markdown_0.6.5 xtable_1.7-1 knitr_1.5 audio_0.1-4 ggplot2_0.9.3.1
[6] scales_0.2.3 stringr_0.6.2 reshape2_1.2.2 reshape_0.8.4 plyr_1.8
[11] data.table_1.9.2
謝謝!
嘗試這個:
<style>
.displayed { border: solid 1px; }
</style>
<img src="Rplot001.png" class="displayed">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.