小编Ste*_*zer的帖子

使用HTML data-attribute设置CSS background-image url

我计划为朋友建立一个自定义照片库,我确切知道我将如何制作HTML,但是我遇到了一个CSS的小问题.
(如果可能的话,我宁愿没有页面样式依赖于jQuery)


我的问题是:在CSS
Data-Attribute中使用HTML
Background-image
我使用这种格式的html缩略图:
<div class="thumb" data-image-src="images/img.jpg"></div>

我认为CSS应该是这样的:

.thumb {
    width:150px;
    height:150px;
    background-position:center center;
    overflow:hidden;
    border:1px solid black;

    background-image: attr(data-image-src);/*This is the question piece*/
}
Run Code Online (Sandbox Code Playgroud)


我的目标是把data-image-srcdiv.thumb我的HTML文件,并使用它的每一个div.thumb(或多个)background-image在我的CSS文件来源.

这是一个Codepen Pen,以获得我正在寻找的动态示例:http:
//codepen.io/thestevekelzer/pen/rEDJv

background-image css3 custom-data-attribute

61
推荐指数
4
解决办法
9万
查看次数

DB Schema比较错误:'版本存储内存不足'

下面是我在Visual Studio 2013 Professional w/Update 3中进行模式比较时收到的错误.我使用的是版本2008 R2数据库服务器,我正在使用SSMS 2014.

这个错误持续了几个星期不断出现越来越频繁.所以我重新格式化了我的机器......猜猜是什么......一旦一切都重新设置,我又收到了错误!

请帮助我了解我可以采取哪些措施来解决此问题.谢谢!


Microsoft.Isam.Esent.Interop.EsentVersionStoreOutOfMemoryException
Version store out of memory (cleanup already attempted)

   at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err)
   at Microsoft.Isam.Esent.Interop.Api.JetDelete(JET_SESID sesid, JET_TABLEID tableid)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.EseResultSet.Delete()
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.EseCommand.<>c__DisplayClass1b2.<DeleteRows>b__1b1(EseResultSet rs)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.EseCommand.RunQueryImpl(Func1 stopProcessing, Action1 action, Object[] keys)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.EseCommand.DeleteRows(Object[] keys)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.CoreDelete(ModelElement element, IList1 elementsToSignal)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelStore.DeleteElement(ModelElement element, Boolean includeHierarchical)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelElement.Delete(Boolean deleteHierarchicalChildren)
   at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.UnloadExternals(String fileName)
   at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.OnCustomDataRemoved(CustomSchemaData customData)
   at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.OnCustomDataRemoved(CustomSchemaData customData)
   at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.RemoveCustomData(CustomSchemaData customData)
   at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlModelBuilder.Clear(CustomSchemaData dataToDelete)
   at Microsoft.Data.Tools.Schema.SchemaModel.ModelBuilder.AddOrUpdate(CustomSchemaData customSchemaData)
   at Microsoft.Data.Tools.Schema.Utilities.Sql.Jobs.ModelBuilderJob.RunImpl()
------ Exception Data --------
Key …
Run Code Online (Sandbox Code Playgroud)

database sql-server schema ssms visual-studio

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