小编Sky*_*KOG的帖子

与背景图象的CSS三角

尊敬的stackoverflowers,

如何使用背景图案创建三角形元素?

例如,我需要像这样的div:

在此输入图像描述

但我的状态是这样的:

在此输入图像描述

所有带有三角形元素的例子都使用了边框,这些边框不能使用img ....

这是我的小节课,需要colarrowrow:

<div class="subsection"><span>Ryan Gosling, Mr Landlord</span></div>

.subsection {
  .box-shadow (0, -1px, 1px, 0, rgba(0, 0, 0, 0.3));
  background: url('/assets/pattern-lorem.png'); // The inner part of the slider have the pattern
  display: block;
  clear: both;
  float: left;
  width: 100%;
  padding-top: 15px;
  padding-bottom: 15px;
  display: none;
}
.subsection {
    position:relative;
}
.subsection:before {
    content:'';
    position:absolute;
    top:0;
    left:0;
    height:20px;
    width:0;
    border-left:20px solid white;
    border-bottom:16px solid transparent;
}
.subsection:after {
    content:'';
    position:absolute;
    top:36px;
    left:0;
    bottom:0;
    width:0;
    border-left:20px solid white; …
Run Code Online (Sandbox Code Playgroud)

html css transform css3 css-shapes

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

Rails ActiveRecord :: Relation undefined方法

我有一个模范医院:

class Hospital < ActiveRecord::Base
  attr_accessible  :beds, :fax_no, :hospital_name, :phone_no, :district_id, :institution_type_id, :location_id, :division_id, :block_id, :hospital_type_id, :IsAdministrativeLocation, :IsTribal, :latitude, :longitude

  belongs_to:district
  belongs_to:division
  belongs_to:institution_type  
  belongs_to:hospital_type
  belongs_to:block

  has_many:hospital_reports
  has_many:health_dept_locations
  has_many:sanctioned_posts
  has_many:postings
  has_many:vw_sanctioned_working_by_hospitals
end
Run Code Online (Sandbox Code Playgroud)

vw_sanctioned_working_by_hospitals是如下视图

mysql> desc vw_sanctioned_working_by_hospital;
+--------------------+---------------+------+-----+---------+-------+
| Field              | Type          | Null | Key | Default | Extra |
+--------------------+---------------+------+-----+---------+-------+
| hospital_id        | int(11)       | NO   |     | 0       |       |
| hospital_name      | varchar(255)  | YES  |     | NULL    |       |
| class_1_sanctioned | decimal(32,0) | NO   |     | …
Run Code Online (Sandbox Code Playgroud)

mysql ruby-on-rails rails-activerecord

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