小编Ric*_*nen的帖子

是否有一个类似于-webkit-font-smoothing的firefox:antialiased;?

基本上我正在使用的Web字体在Firefox中显示过于大胆.我使用上面的代码在webkit浏览器中修复它.-moz-font-smoothing: antialiased; 不起作用.所以现在我问你们所有人是否有其他解决方案我只是忽略了.

注意:无论是否是h1字体仍然显示太粗体.

相关代码:

@font-face {    
  font-family: 'GelatoScript';
  src: url('../fonts/gelatoscript/gelatoscript.eot');
  src: url('../fonts/gelatoscript/gelatoscript.eot?#iefix') format('embedded-opentype'),
       url('../fonts/gelatoscript/gelatoscript.woff') format('woff'),
       url('../fonts/gelatoscript/gelatoscript.ttf') format('truetype'),
       url('../fonts/gelatoscript/gelatoscript.svg#GelatoScript') format('svg');
font-weight: normal;
font-style: normal;
}

h1.pale {
  color: #f6ff96;
  font-family: 'GelatoScript';
  font-weight: 100; 
  font-size: 3.5em;
  margin-bottom: 0;
  text-shadow: .042em .042em 0px #787878;
}

<h1 class="pale" >Check this out!</h1>
Run Code Online (Sandbox Code Playgroud)

css css3

3
推荐指数
1
解决办法
5067
查看次数

在文件系统中存储图像会破坏文件.有没有更好的方法来写这个?为什么我会破坏文件?

post '/upload' do
  unless params[:file] && (tmpfile = params[:file][:tempfile]) && (name = params[:file][:filename])
    return haml(:upload)
  end
  time = Time.now.to_s
  time.gsub!(/\s/, '')
  name = time + name
  while blk = tmpfile.read(65536)
    File.open(File.join(Dir.pwd,"public/uploads", name), "wb") { |f| f.write(tmpfile.read) }
  end
  'success'
end
Run Code Online (Sandbox Code Playgroud)

一切都在预期文件最终被破坏的地方.

ruby post file-upload image sinatra

1
推荐指数
1
解决办法
257
查看次数

标签 统计

css ×1

css3 ×1

file-upload ×1

image ×1

post ×1

ruby ×1

sinatra ×1