我有以下纯CSS规则:
#cboxOverlay{
background:url(images/overlay.png) repeat 0 0;
opacity: 0.9;
filter: alpha(opacity = 90);
}
当我用less(lessc
)进行编译时,它会使alpha(opacity = 90)
成为Less函数。
如何将alpha(opacity = 90)
转换为简单的CSS?
答案 0 :(得分:1)
要escape个字符串,您需要像这样murder <- subset(crime, offense == "murder")
murder <- SpatialPointsDataFrame(murder[,c("lon", "lat")], data=murder,
proj4string = CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"))
p <- ggmap(get_map(location=c(lon=(max(murder$lon)+min(murder$lon))/2, lat=(max(murder$lat)+min(murder$lat))/2), maptype="toner-lite",
language="es-ES", crop = TRUE, zoom=12, force=T), darken = c(0.5, "gray"))
respaldo <- murder
mapas <- "C:/Users/Li/Documents/"
d <- unique(respaldo$month)
for (i in d){
murder <- respaldo[respaldo$month==i,]
mapa <- p+geom_point(data=murder@data, aes(x=murder@coords[,1],
y=murder@coords[,2], color=as.numeric(hour)), alpha=0.5,size=7) +
scale_color_viridis_c(option="C",breaks=c(0,2,4,8,12,16,20,23),
labels=c("00:00","02:00", "04:00","08:00","12:00","16:00","20:00","23:00"),
name="Hour",
guide=guide_legend( keyheight = unit(3, units = "mm"),
keywidth=unit(6, units = "mm"),
label.position = "bottom", title.position = 'top', nrow=1,
label.theme=element_text(size = 6,face = "bold",color = "grey2",family = "Gotham"),
title.theme=element_text(size = 6,face = "bold",color = "grey2",family = "Gotham", hjust=0.5)
))
ggsave(filename=paste0(mapas,i,".png"),plot=mapa, bg="transparent",
width =15, height = 15, units="cm", dpi=500)
}
来包装它,这将使编译器按原样输出字符串。
更改:
~'<string>'
收件人:
filter: alpha(opacity = 90);
答案 1 :(得分:1)
这应该有效:
#cboxOverlay{
background:url(images/overlay.png) repeat 0 0;
opacity: 0.9;
filter: ~"alpha(opacity = 90)";
}