我正在制作一个网站,有些东西很烦人......这里是代码:
.log {
color: #FF00FC;
font-family: Josefin Regular;
font-size: 12.8pt;
outline: 3.2px solid #ff00fc;
padding: 6px;
position: relative;
top: 400px;
left: 10px;
transform: rotate(10deg);
z-index: 0;
}

<p class='log'>>_</p>
&#13;
出于某种原因,<p>
这么长,它占用的频率超过了屏幕。如何使outline:
更小以适应我的喜好?我希望它不那么广泛。谢谢,我希望你明白。
答案 0 :(得分:6)
默认情况下,p
元素显示为块。如果您将显示设置为inline-block
,则应该解决问题:
.log {
color: #FF00FC;
font-family: Josefin Regular;
font-size: 12.8pt;
outline: 3.2px solid #ff00fc;
padding: 6px;
position: relative;
top: 400px;
left: 10px;
transform: rotate(10deg);
z-index: 0;
display:inline-block
}
<p class='log'>>_</p>
答案 1 :(得分:5)
将display
更改为inline-block
:
.log {
display: inline-block;
color: #FF00FC;
font-family: Josefin Regular;
font-size: 12.8pt;
outline: 3.2px solid #ff00fc;
padding: 6px;
position: relative;
top: 400px;
left: 10px;
transform: rotate(10deg);
z-index: 0;
}
<p class='log'>>_</p>
默认情况下,display: block
会应用于<p>
,当position
为relative
static
或.log
时,会导致其覆盖整个容器的宽度。
或者,如果position: relative
的父级是position: absolute
,则可以将其更改为display: inline-block
,而您无需申请body {
position: relative;
}
.log {
color: #FF00FC;
font-family: Josefin Regular;
font-size: 12.8pt;
outline: 3.2px solid #ff00fc;
padding: 6px;
position: absolute;
top: 400px;
left: 10px;
transform: rotate(10deg);
z-index: 0;
}
:
<p class='log'>>_</p>
output <- array(, dim=c(192,94,12,160))# need to change this to length(Lat), etc
N <- length(filelist) # Loop over the individual files
for(j in 1:N){
File<-nc_open(filelist[j])
print(filelist[j])
Temperature<-ncvar_get(File,"t2m")
Lat<-ncvar_get(File, "lat")
Lon<-ncvar_get(File,"lon")
Time<-ncvar_get(File,"time")
Year<-c(1851:2010)
EnsambleNo.<-ncvar_get(File,"ensemble_member")
Temperature
Lat<-round(Lat,digits = 2)
Lon<-round(Lon,digits = 2)
Ensamble1<-Temperature[,,1,] #The Ensamble wanted, 1 to 56
Ensamble1<-round(Ensamble1,digits = 1)
dimnames(Ensamble1)<-list(Lon,Lat,Time)
dimnames(output) <- list(Lon,Lat,Time,Year)
}
print(Ensamble1)
答案 2 :(得分:3)
p
元素默认为display: block;
,它将占用流量允许的宽度。通过在display: inline-block;
规则中添加.log
,可以解决此问题。