水平<img/>和<div>之间的细线

时间:2016-12-08 15:23:41

标签: html css

我在黑色图像和背景为黑色背景的div之间有一条细白线,主体背景设置为白色。我试过设置border: 0 !important等等,但我无法摆脱它。

site header

有没有删除它?

3 个答案:

答案 0 :(得分:1)

当然,请在# This class overrides devise's registration controller. All # other devise actions remain (I believe) handled as usual by # devise. I think it is the route that does that by specifying # this controller specifically for the purpose of registrations # # see also: http://stackoverflow.com/questions/3546289 class Users::RegistrationsController < Devise::RegistrationsController before_filter :configure_permitted_parameters, if: :devise_controller? # SOFT DELETE /resource # Follows devise guide: https://github.com/plataformatec/devise/wiki/How-to:-Soft-delete-a-user-when-user-deletes-account def destroy resource.soft_delete Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name) set_flash_message :notice, :destroyed if is_flashing_format? yield resource if block_given? respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) } puts " -- controller: id:#{resource.id}, deleted_at:#{resource.deleted_at}" end protected # we have to explicitly permit params in overridden controllers like this # see https://github.com/plataformatec/devise#strong-parameters def configure_permitted_parameters devise_parameter_sanitizer.permit(:sign_up) do |u| u.permit(:name, :email, :password, :password_confirmation) end devise_parameter_sanitizer.permit(:account_update) do |u| u.permit(:name, :email, :password, :password_confirmation, :current_password) end end end border: none;上尝试div。还要仔细检查它是否实际上不是图像的一部分。它也可能是img上的margin。最后,尝试将divdiv紧密排列在一起,没有空格。

img

而不是

 <img><div>

答案 1 :(得分:0)

尝试将图像设置为“display:block;”用CSS。如果Line不在您的图片或DIV中,则应该解决问题。

答案 2 :(得分:0)

试一试: -

img{
vertical-align:middle;
}