Question: According to [cppreference](http://en.cppreference.com/w/cpp/io/basic_ostringstream), **std::basic\_ostringstream** can be instantiated with a custom allocator. Since C++11, allocators are allowed to have state and my custom allocator class does have internal per-instance state (actually each allocator instance has a pointer to an instance of a **MemPool** class, to which it forwards all allocation requests). This is why my allocator type can't just simply be default-constructed and be expected to work because after all, where is it going to get the address of the **MemPool** instance it's supposed to use from?

Unfortunately, if you take a look at the [constructor prototypes](http://en.cppreference.com/w/cpp/io/basic_ostringstream/basic_ostringstream) of **std::basic\_ostringstream**, you can see that none of the supported constructors actually take an allocator instance! I'm pretty sure that **std::basic\_ostringstream** will have to make some allocation(s) to construct its resulting string, and I really want it to use my allocator for those, but how is it going to do that if I have no way of telling it which specific **MemPool** instance to use??

Have I overlooked something here? I feel like I must have but I sure don't see how at the moment.

Answer: 
There's also the option of using CSS animation. Support is roughly the same as CSS transition (<http://caniuse.com/css-animation>, <http://caniuse.com/css-transitions>), but the code is a bit longer (mostly because you'll have to add the -webkit prefix versions as well).

Demo: <http://jsfiddle.net/32Qrb/3/>

Relevant CSS:

```
.seg1{
-webkit-border-radius:400px;
border:1px solid #b1ebeb;
height:250px;
width:250px;
float:left;
background-color:#f1fbfb;
}

.seg1:hover{
    animation-duration: 3s;
    animation-name: zoomin;
    animation-fill-mode: forwards;
    -webkit-animation-duration: 3s;
    -webkit-animation-name: zoomin;
    -webkit-animation-fill-mode: forwards;

    background-image:url('http://lorempixel.com/256/256'); 
    background-position: center;
}

@keyframes zoomin {
  from {
      background-size: 100%;
  }

  to {
      background-size: 200%;
  }
}

@-webkit-keyframes zoomin {
  from {
      background-size: 100%;
  }

  to {
      background-size: 200%;
  }
}

```
you could try this for example:

<http://jsfiddle.net/3q9ex/>

```
background-position: -100px center;

```

And play with this:

```
background-size: cover;

```